* test-9.il: New test, test instaniating a class
[mono.git] / mono / metadata / exception.h
1 #ifndef _MONO_METADATA_EXCEPTION_H_
2 #define _MONO_METADATA_EXCEPTION_H_
3
4 #ifdef MONO_USE_EXC_TABLES
5 #define MONO_ARCH_SAVE_REGS __builtin_unwind_init ()
6 #else
7 #define MONO_ARCH_SAVE_REGS 
8 #endif
9
10 #include <mono/metadata/object.h>
11 #include <mono/metadata/image.h>
12
13 typedef void (*MonoExceptionClassInitFunc)(MonoClass *klass);
14 typedef void (*MonoExceptionObjectInitFunc)(MonoObject *obj, MonoClass *klass);
15
16 extern void
17 mono_exception_install_handlers (MonoExceptionClassInitFunc class_init,
18                                  MonoExceptionObjectInitFunc obj_init);
19
20 extern MonoException *
21 mono_exception_from_name               (MonoImage *image, 
22                                         const char* name_space, 
23                                         const char *name);
24
25 MonoException *
26 mono_get_exception_divide_by_zero      (void);
27
28 MonoException *
29 mono_get_exception_security            (void);
30
31 MonoException *
32 mono_get_exception_arithmetic          (void);
33
34 MonoException *
35 mono_get_exception_overflow            (void);
36
37 MonoException *
38 mono_get_exception_null_reference      (void);
39
40 MonoException *
41 mono_get_exception_execution_engine    (const guchar *msg);
42
43 MonoException *
44 mono_get_exception_thread_abort        (void);
45
46 MonoException *
47 mono_get_exception_thread_state        (const guchar *msg);
48
49 MonoException *
50 mono_get_exception_serialization       (const guchar *msg);
51
52 MonoException *
53 mono_get_exception_invalid_cast        (void);
54
55 MonoException *
56 mono_get_exception_index_out_of_range  (void);
57
58 MonoException *
59 mono_get_exception_array_type_mismatch (void);
60
61 MonoException *
62 mono_get_exception_type_load           (void);
63
64 MonoException *
65 mono_get_exception_missing_method      (void);
66
67 MonoException *
68 mono_get_exception_not_implemented     (void);
69
70 MonoException*
71 mono_get_exception_argument_null       (const guchar *arg);
72
73 MonoException *
74 mono_get_exception_argument            (const guchar *arg, const guchar *msg);
75
76 MonoException *
77 mono_get_exception_argument_out_of_range (const guchar *arg);
78
79 MonoException *
80 mono_get_exception_io                    (const guchar *msg);
81
82 MonoException *
83 mono_get_exception_file_not_found        (MonoString *fname);
84
85 MonoException *
86 mono_get_exception_type_initialization (const gchar *type_name, MonoException *inner);
87
88 MonoException *
89 mono_get_exception_synchronization_lock (const guchar *msg);
90
91 #endif /* _MONO_METADATA_EXCEPTION_H_ */