2009-12-26 Rodrigo Kumpera <rkumpera@novell.com>
[mono.git] / mono / utils / mono-error-internals.h
blob10761e0d160bb945f0e803c1c535fa2c9bc0f7f9
1 #ifndef __MONO_ERROR_INTERNALS_H__
2 #define __MONO_ERROR_INTERNALS_H__
4 #include "mono/utils/mono-compiler.h"
5 #include "mono/metadata/object-internals.h"
7 /*Keep in sync with MonoError*/
8 typedef struct {
9 unsigned short error_code;
10 unsigned short flags;
12 /*These name are suggestions of their content. MonoError internals might use them for something else.*/
13 const char *type_name;
14 const char *assembly_name;
15 const char *member_name;
16 const char *exception_name_space;
17 const char *exception_name;
18 MonoClass *klass;
19 const char *full_message;
21 void *padding [5];
22 char message [128];
23 } MonoErrorInternal;
25 void
26 mono_error_dup_strings (MonoError *error, gboolean dup_strings) MONO_INTERNAL;
28 /* This function is not very useful as you can't provide any details beyond the message.*/
29 void
30 mono_error_set_error (MonoError *error, int error_code, const char *msg_format, ...) MONO_INTERNAL;
32 void
33 mono_error_set_assembly_load (MonoError *error, const char *assembly_name, const char *msg_format, ...) MONO_INTERNAL;
35 void
36 mono_error_set_type_load_class (MonoError *error, MonoClass *klass, const char *msg_format, ...) MONO_INTERNAL;
38 void
39 mono_error_set_type_load_name (MonoError *error, const char *type_name, const char *assembly_name, const char *msg_format, ...) MONO_INTERNAL;
41 void
42 mono_error_set_method_load (MonoError *error, MonoClass *klass, const char *method_name, const char *msg_format, ...) MONO_INTERNAL;
44 void
45 mono_error_set_field_load (MonoError *error, MonoClass *klass, const char *field_name, const char *msg_format, ...) MONO_INTERNAL;
47 void
48 mono_error_set_bad_image (MonoError *error, MonoImage *image, const char *msg_format, ...) MONO_INTERNAL;
50 void
51 mono_error_set_bad_image_name (MonoError *error, const char *file_name, const char *msg_format, ...) MONO_INTERNAL;
53 void
54 mono_error_set_out_of_memory (MonoError *error, const char *msg_format, ...) MONO_INTERNAL;
56 void
57 mono_error_set_argument (MonoError *error, const char *argument, const char *msg_format, ...) MONO_INTERNAL;
59 void
60 mono_error_set_generic_error (MonoError *error, const char * name_space, const char *name, const char *msg_format, ...) MONO_INTERNAL;
62 MonoException*
63 mono_error_prepare_exception (MonoError *error, MonoError *error_out) MONO_INTERNAL;
65 void
66 mono_error_raise_exception (MonoError *error) MONO_INTERNAL;
68 #endif