-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathTestExceptions.cs
More file actions
35 lines (31 loc) · 831 Bytes
/
TestExceptions.cs
File metadata and controls
35 lines (31 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System.Threading.Tasks;
namespace Nahoum.UnityJSInterop.Tests
{
public class TestExceptions
{
[ExposeWeb]
public static void ThrowSimpleException()
{
throw new System.Exception(SampleValues.TestExceptionValue);
}
[ExposeWeb]
public static void TestUnraisedException()
{
string obj = null;
obj.ToString();
}
[ExposeWeb]
public static async Task ThrowSimpleExceptionAsync()
{
await Task.Yield();
throw new System.Exception(SampleValues.TestExceptionValue);
}
[ExposeWeb]
public static async Task TestUnraisedExceptionAsync()
{
await Task.Yield();
string obj = null;
obj.ToString();
}
}
}