1 module skia.Exceptions;
2 
3 private mixin template BasicExceptionCtors() {
4     
5     this(size_t line = __LINE__, string file = __FILE__) @nogc @safe pure nothrow {
6         super("", file, line, null);
7     }
8 
9     this(string msg, string file = __FILE__, size_t line = __LINE__, Throwable next = null) @nogc @safe pure nothrow {
10         super(msg, file, line, next);
11     }
12 
13     this(string msg, Throwable next, string file = __FILE__, size_t line = __LINE__) @nogc @safe pure nothrow {
14         super(msg, file, line, next);
15     }
16 
17     this(Throwable next, string file = __FILE__, size_t line = __LINE__) @nogc @safe pure nothrow {
18         assert(next !is null);
19         super(next.msg, file, line, next);
20     }
21 }
22 
23 class ArgumentException : Exception {
24     mixin BasicExceptionCtors;
25 }
26 
27 class ArgumentNullException : Exception {
28     mixin BasicExceptionCtors;
29 }
30 
31 class ArgumentOutOfRangeException : Exception {
32 
33     this(string msg, size_t line = __LINE__, string file = __FILE__, Throwable next = null) @nogc @safe pure nothrow {
34         super(msg, file, line, next);
35     }
36 
37     this(string paramName, string message, string file = __FILE__, size_t line = __LINE__, Throwable next = null) @safe pure nothrow {
38         super("Parameter name: " ~ paramName ~ ", message: " ~ message, file, line, next);
39     }
40 }
41 
42 class InvalidOperationException: Exception {
43     mixin BasicExceptionCtors;
44 }
45 
46 class NotSupportedException: Exception{
47   mixin BasicExceptionCtors;
48 }
49 
50 class ObjectDisposedException: Exception {
51      mixin BasicExceptionCtors;
52 }
53 
54 class NotImplementedException: Exception {
55   mixin BasicExceptionCtors;
56 }
57 
58 class TypeLoadException: Exception {
59   mixin BasicExceptionCtors;
60 }
61 
62 class NullPointerException: Exception {
63     mixin BasicExceptionCtors;
64 }
65