Merge pull request #3100 from lambdageek/dev/monoerror-exns
[mono.git] / mono / metadata / exception.h
1 #ifndef _MONO_METADATA_EXCEPTION_H_
2 #define _MONO_METADATA_EXCEPTION_H_
3
4 #include <mono/metadata/object.h>
5 #include <mono/metadata/image.h>
6
7 MONO_BEGIN_DECLS
8
9 extern MONO_API MonoException *
10 mono_exception_from_name               (MonoImage *image, 
11                                         const char* name_space, 
12                                         const char *name);
13
14 MONO_API MonoException *
15 mono_exception_from_token              (MonoImage *image, uint32_t token);
16
17 MONO_RT_EXTERNAL_ONLY
18 MONO_API MonoException *
19 mono_exception_from_name_two_strings (MonoImage *image, const char *name_space,
20                                       const char *name, MonoString *a1, MonoString *a2);
21
22 MONO_API MonoException *
23 mono_exception_from_name_msg           (MonoImage *image, const char *name_space,
24                                         const char *name, const char *msg);
25
26 MONO_RT_EXTERNAL_ONLY
27 MONO_API MonoException *
28 mono_exception_from_token_two_strings (MonoImage *image, uint32_t token,
29                                                    MonoString *a1, MonoString *a2);
30
31 extern MONO_API MonoException *
32 mono_exception_from_name_domain        (MonoDomain *domain, MonoImage *image, 
33                                         const char* name_space, 
34                                         const char *name);
35
36 MONO_API MonoException *
37 mono_get_exception_divide_by_zero      (void);
38
39 MONO_API MonoException *
40 mono_get_exception_security            (void);
41
42 MONO_API MonoException *
43 mono_get_exception_arithmetic          (void);
44
45 MONO_API MonoException *
46 mono_get_exception_overflow            (void);
47
48 MONO_API MonoException *
49 mono_get_exception_null_reference      (void);
50
51 MONO_API MonoException *
52 mono_get_exception_execution_engine    (const char *msg);
53
54 MONO_API MonoException *
55 mono_get_exception_thread_abort        (void);
56
57 MONO_API MonoException *
58 mono_get_exception_thread_state        (const char *msg);
59
60 MONO_API MonoException *
61 mono_get_exception_thread_interrupted  (void);
62
63 MONO_API MonoException *
64 mono_get_exception_serialization       (const char *msg);
65
66 MONO_API MonoException *
67 mono_get_exception_invalid_cast        (void);
68
69 MONO_API MonoException *
70 mono_get_exception_invalid_operation (const char *msg);
71
72 MONO_API MonoException *
73 mono_get_exception_index_out_of_range  (void);
74
75 MONO_API MonoException *
76 mono_get_exception_array_type_mismatch (void);
77
78 MONO_API MonoException *
79 mono_get_exception_type_load           (MonoString *class_name, char *assembly_name);
80
81 MONO_API MonoException *
82 mono_get_exception_missing_method      (const char *class_name, const char *member_name);
83
84 MONO_API MonoException *
85 mono_get_exception_missing_field       (const char *class_name, const char *member_name);
86
87 MONO_API MonoException *
88 mono_get_exception_not_implemented     (const char *msg);
89
90 MONO_API MonoException *
91 mono_get_exception_not_supported       (const char *msg);
92
93 MONO_API MonoException*
94 mono_get_exception_argument_null       (const char *arg);
95
96 MONO_API MonoException *
97 mono_get_exception_argument            (const char *arg, const char *msg);
98
99 MONO_API MonoException *
100 mono_get_exception_argument_out_of_range (const char *arg);
101
102 MONO_API MonoException *
103 mono_get_exception_io                    (const char *msg);
104
105 MONO_API MonoException *
106 mono_get_exception_file_not_found        (MonoString *fname);
107
108 MONO_API MonoException *
109 mono_get_exception_file_not_found2       (const char *msg, MonoString *fname);
110
111 MONO_RT_EXTERNAL_ONLY
112 MONO_API MonoException *
113 mono_get_exception_type_initialization (const char *type_name, MonoException *inner);
114
115 MONO_API MonoException *
116 mono_get_exception_synchronization_lock (const char *msg);
117
118 MONO_API MonoException *
119 mono_get_exception_cannot_unload_appdomain (const char *msg);
120
121 MONO_API MonoException *
122 mono_get_exception_appdomain_unloaded (void);
123
124 MONO_API MonoException *
125 mono_get_exception_bad_image_format (const char *msg);
126
127 MONO_API MonoException *
128 mono_get_exception_bad_image_format2 (const char *msg, MonoString *fname);
129
130 MONO_API MonoException *
131 mono_get_exception_stack_overflow (void);
132
133 MONO_API MonoException *
134 mono_get_exception_out_of_memory (void);
135
136 MONO_API MonoException *
137 mono_get_exception_field_access (void);
138
139 MONO_API MonoException *
140 mono_get_exception_method_access (void);
141
142 MONO_RT_EXTERNAL_ONLY
143 MONO_API MonoException *
144 mono_get_exception_reflection_type_load (MonoArray *types, MonoArray *exceptions);
145
146 MONO_RT_EXTERNAL_ONLY
147 MONO_API MonoException *
148 mono_get_exception_runtime_wrapped (MonoObject *wrapped_exception);
149
150 MONO_END_DECLS
151
152 #endif /* _MONO_METADATA_EXCEPTION_H_ */