1 #ifndef _MONO_METADATA_EXCEPTION_H_
2 #define _MONO_METADATA_EXCEPTION_H_
4 #include <mono/metadata/object.h>
5 #include <mono/metadata/image.h>
9 extern MONO_API MonoException *
10 mono_exception_from_name (MonoImage *image,
11 const char* name_space,
14 MONO_API MonoException *
15 mono_exception_from_token (MonoImage *image, uint32_t token);
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);
22 MONO_API MonoException *
23 mono_exception_from_name_msg (MonoImage *image, const char *name_space,
24 const char *name, const char *msg);
27 MONO_API MonoException *
28 mono_exception_from_token_two_strings (MonoImage *image, uint32_t token,
29 MonoString *a1, MonoString *a2);
31 extern MONO_API MonoException *
32 mono_exception_from_name_domain (MonoDomain *domain, MonoImage *image,
33 const char* name_space,
36 MONO_API MonoException *
37 mono_get_exception_divide_by_zero (void);
39 MONO_API MonoException *
40 mono_get_exception_security (void);
42 MONO_API MonoException *
43 mono_get_exception_arithmetic (void);
45 MONO_API MonoException *
46 mono_get_exception_overflow (void);
48 MONO_API MonoException *
49 mono_get_exception_null_reference (void);
51 MONO_API MonoException *
52 mono_get_exception_execution_engine (const char *msg);
54 MONO_API MonoException *
55 mono_get_exception_thread_abort (void);
57 MONO_API MonoException *
58 mono_get_exception_thread_state (const char *msg);
60 MONO_API MonoException *
61 mono_get_exception_thread_interrupted (void);
63 MONO_API MonoException *
64 mono_get_exception_serialization (const char *msg);
66 MONO_API MonoException *
67 mono_get_exception_invalid_cast (void);
69 MONO_API MonoException *
70 mono_get_exception_invalid_operation (const char *msg);
72 MONO_API MonoException *
73 mono_get_exception_index_out_of_range (void);
75 MONO_API MonoException *
76 mono_get_exception_array_type_mismatch (void);
78 MONO_API MonoException *
79 mono_get_exception_type_load (MonoString *class_name, char *assembly_name);
81 MONO_API MonoException *
82 mono_get_exception_missing_method (const char *class_name, const char *member_name);
84 MONO_API MonoException *
85 mono_get_exception_missing_field (const char *class_name, const char *member_name);
87 MONO_API MonoException *
88 mono_get_exception_not_implemented (const char *msg);
90 MONO_API MonoException *
91 mono_get_exception_not_supported (const char *msg);
93 MONO_API MonoException*
94 mono_get_exception_argument_null (const char *arg);
96 MONO_API MonoException *
97 mono_get_exception_argument (const char *arg, const char *msg);
99 MONO_API MonoException *
100 mono_get_exception_argument_out_of_range (const char *arg);
102 MONO_API MonoException *
103 mono_get_exception_io (const char *msg);
105 MONO_API MonoException *
106 mono_get_exception_file_not_found (MonoString *fname);
108 MONO_API MonoException *
109 mono_get_exception_file_not_found2 (const char *msg, MonoString *fname);
111 MONO_RT_EXTERNAL_ONLY
112 MONO_API MonoException *
113 mono_get_exception_type_initialization (const char *type_name, MonoException *inner);
115 MONO_API MonoException *
116 mono_get_exception_synchronization_lock (const char *msg);
118 MONO_API MonoException *
119 mono_get_exception_cannot_unload_appdomain (const char *msg);
121 MONO_API MonoException *
122 mono_get_exception_appdomain_unloaded (void);
124 MONO_API MonoException *
125 mono_get_exception_bad_image_format (const char *msg);
127 MONO_API MonoException *
128 mono_get_exception_bad_image_format2 (const char *msg, MonoString *fname);
130 MONO_API MonoException *
131 mono_get_exception_stack_overflow (void);
133 MONO_API MonoException *
134 mono_get_exception_out_of_memory (void);
136 MONO_API MonoException *
137 mono_get_exception_field_access (void);
139 MONO_API MonoException *
140 mono_get_exception_method_access (void);
142 MONO_RT_EXTERNAL_ONLY
143 MONO_API MonoException *
144 mono_get_exception_reflection_type_load (MonoArray *types, MonoArray *exceptions);
146 MONO_RT_EXTERNAL_ONLY
147 MONO_API MonoException *
148 mono_get_exception_runtime_wrapped (MonoObject *wrapped_exception);
152 #endif /* _MONO_METADATA_EXCEPTION_H_ */