-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathExceptions.cs
73 lines (62 loc) · 2.27 KB
/
Exceptions.cs
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
using System;
namespace VSharp.CSharpUtils
{
public static class Exceptions
{
[Implements("System.Void System.InvalidCastException..ctor(this, System.String)")]
public static void CreateInvalidCastException(string msg)
{
throw new InvalidCastException(msg);
}
[Implements("System.Void System.NullReferenceException..ctor(this)")]
public static void CreateNullReferenceException()
{
throw new NullReferenceException();
}
[Implements("System.Void System.OverflowException..ctor(this)")]
public static void CreateOverflowException()
{
throw new OverflowException();
}
[Implements("System.Void System.IndexOutOfRangeException..ctor(this)")]
public static void CreateIndexOutOfRangeException()
{
throw new IndexOutOfRangeException();
}
[Implements("System.Void System.ArgumentOutOfRangeException..ctor(this)")]
public static void ArgumentOutOfRangeException()
{
throw new ArgumentOutOfRangeException();
}
[Implements("System.Void System.ArgumentException..ctor(this)")]
public static void ArgumentException()
{
throw new ArgumentException();
}
[Implements("System.Void System.DivideByZeroException..ctor(this)")]
public static void DivideByZeroException()
{
throw new DivideByZeroException();
}
[Implements("System.Void System.ArithmeticException..ctor(this)")]
public static void ArithmeticException()
{
throw new ArithmeticException();
}
[Implements("System.Void System.ArrayTypeMismatchException..ctor(this)")]
public static void CreateArrayTypeMismatchException()
{
throw new ArrayTypeMismatchException();
}
[Implements("System.Void System.ArgumentNullException..ctor(this)")]
public static void CreateArgumentNullException()
{
throw new ArgumentNullException();
}
[Implements("System.Void System.OutOfMemoryException..ctor(this)")]
public static void CreateOutOfMemoryException()
{
throw new OutOfMemoryException();
}
}
}