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);
26 MONO_API MonoException *
27 mono_exception_from_token_two_strings (MonoImage *image, uint32_t token,
28 MonoString *a1, MonoString *a2);
30 extern MONO_API MonoException *
31 mono_exception_from_name_domain (MonoDomain *domain, MonoImage *image,
32 const char* name_space,
35 MONO_API MonoException *
36 mono_get_exception_divide_by_zero (void);
38 MONO_API MonoException *
39 mono_get_exception_security (void);
41 MONO_API MonoException *
42 mono_get_exception_arithmetic (void);
44 MONO_API MonoException *
45 mono_get_exception_overflow (void);
47 MONO_API MonoException *
48 mono_get_exception_null_reference (void);
50 MONO_API MonoException *
51 mono_get_exception_execution_engine (const char *msg);
53 MONO_API MonoException *
54 mono_get_exception_thread_abort (void);
56 MONO_API MonoException *
57 mono_get_exception_thread_state (const char *msg);
59 MONO_API MonoException *
60 mono_get_exception_thread_interrupted (void);
62 MONO_API MonoException *
63 mono_get_exception_serialization (const char *msg);
65 MONO_API MonoException *
66 mono_get_exception_invalid_cast (void);
68 MONO_API MonoException *
69 mono_get_exception_invalid_operation (const char *msg);
71 MONO_API MonoException *
72 mono_get_exception_index_out_of_range (void);
74 MONO_API MonoException *
75 mono_get_exception_array_type_mismatch (void);
77 MONO_API MonoException *
78 mono_get_exception_type_load (MonoString *class_name, char *assembly_name);
80 MONO_API MonoException *
81 mono_get_exception_missing_method (const char *class_name, const char *member_name);
83 MONO_API MonoException *
84 mono_get_exception_missing_field (const char *class_name, const char *member_name);
86 MONO_API MonoException *
87 mono_get_exception_not_implemented (const char *msg);
89 MONO_API MonoException *
90 mono_get_exception_not_supported (const char *msg);
92 MONO_API MonoException*
93 mono_get_exception_argument_null (const char *arg);
95 MONO_API MonoException *
96 mono_get_exception_argument (const char *arg, const char *msg);
98 MONO_API MonoException *
99 mono_get_exception_argument_out_of_range (const char *arg);
101 MONO_API MonoException *
102 mono_get_exception_io (const char *msg);
104 MONO_API MonoException *
105 mono_get_exception_file_not_found (MonoString *fname);
107 MONO_API MonoException *
108 mono_get_exception_file_not_found2 (const char *msg, MonoString *fname);
110 MONO_RT_EXTERNAL_ONLY
111 MONO_API MonoException *
112 mono_get_exception_type_initialization (const char *type_name, MonoException *inner);
114 MONO_API MonoException *
115 mono_get_exception_synchronization_lock (const char *msg);
117 MONO_API MonoException *
118 mono_get_exception_cannot_unload_appdomain (const char *msg);
120 MONO_API MonoException *
121 mono_get_exception_appdomain_unloaded (void);
123 MONO_API MonoException *
124 mono_get_exception_bad_image_format (const char *msg);
126 MONO_API MonoException *
127 mono_get_exception_bad_image_format2 (const char *msg, MonoString *fname);
129 MONO_API MonoException *
130 mono_get_exception_stack_overflow (void);
132 MONO_API MonoException *
133 mono_get_exception_out_of_memory (void);
135 MONO_API MonoException *
136 mono_get_exception_field_access (void);
138 MONO_API MonoException *
139 mono_get_exception_method_access (void);
141 MONO_RT_EXTERNAL_ONLY
142 MONO_API MonoException *
143 mono_get_exception_reflection_type_load (MonoArray *types, MonoArray *exceptions);
145 MONO_RT_EXTERNAL_ONLY
146 MONO_API MonoException *
147 mono_get_exception_runtime_wrapped (MonoObject *wrapped_exception);
151 #endif /* _MONO_METADATA_EXCEPTION_H_ */