1 #ifndef __MONO_ERROR_H__
2 #define __MONO_ERROR_H__
4 #include <mono/utils/mono-publib.h>
8 The supplied strings were dup'd by means of calling mono_error_dup_strings.
10 MONO_ERROR_FREE_STRINGS = 0x0001,
13 Something happened while processing the error and the resulting message is incomplete.
15 MONO_ERROR_INCOMPLETE = 0x0002
20 MONO_ERROR_MISSING_METHOD = 1,
21 MONO_ERROR_MISSING_FIELD = 2,
22 MONO_ERROR_TYPE_LOAD = 3,
23 MONO_ERROR_FILE_NOT_FOUND = 4,
24 MONO_ERROR_BAD_IMAGE = 5,
25 MONO_ERROR_OUT_OF_MEMORY = 6,
26 MONO_ERROR_ARGUMENT = 7,
27 MONO_ERROR_ARGUMENT_NULL = 11,
28 MONO_ERROR_NOT_VERIFIABLE = 8,
30 * This is a generic error mechanism is you need to raise an arbitrary corlib exception.
31 * You must pass the exception name otherwise prepare_exception will fail with internal execution.
33 MONO_ERROR_GENERIC = 9,
34 /* This one encapsulates a managed exception instance */
35 MONO_ERROR_EXCEPTION_INSTANCE = 10
38 /*Keep in sync with MonoErrorInternal*/
39 typedef struct _MonoError {
40 unsigned short error_code;
41 unsigned short hidden_0; /*DON'T TOUCH */
43 void *hidden_1 [12]; /*DON'T TOUCH */
49 mono_error_init (MonoError *error);
52 mono_error_init_flags (MonoError *error, unsigned short flags);
55 mono_error_cleanup (MonoError *error);
58 mono_error_ok (MonoError *error);
60 MONO_API unsigned short
61 mono_error_get_error_code (MonoError *error);
64 mono_error_get_message (MonoError *error);