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,
17 This MonoError is heap allocated in a mempool
19 MONO_ERROR_MEMPOOL_BOXED
= 0x0004
24 MONO_ERROR_MISSING_METHOD
= 1,
25 MONO_ERROR_MISSING_FIELD
= 2,
26 MONO_ERROR_TYPE_LOAD
= 3,
27 MONO_ERROR_FILE_NOT_FOUND
= 4,
28 MONO_ERROR_BAD_IMAGE
= 5,
29 MONO_ERROR_OUT_OF_MEMORY
= 6,
30 MONO_ERROR_ARGUMENT
= 7,
31 MONO_ERROR_ARGUMENT_NULL
= 11,
32 MONO_ERROR_NOT_VERIFIABLE
= 8,
33 MONO_ERROR_INVALID_PROGRAM
= 12,
36 * This is a generic error mechanism is you need to raise an arbitrary corlib exception.
37 * You must pass the exception name otherwise prepare_exception will fail with internal execution.
39 MONO_ERROR_GENERIC
= 9,
40 /* This one encapsulates a managed exception instance */
41 MONO_ERROR_EXCEPTION_INSTANCE
= 10,
43 /* Not a valid error code - indicates that the error was cleaned up and reused */
44 MONO_ERROR_CLEANUP_CALLED_SENTINEL
= 0xffff
47 /*Keep in sync with MonoErrorInternal*/
48 typedef struct _MonoError
{
49 unsigned short error_code
;
50 unsigned short hidden_0
; /*DON'T TOUCH */
52 void *hidden_1
[12]; /*DON'T TOUCH */
55 /* Mempool-allocated MonoError.*/
56 typedef struct _MonoErrorBoxed MonoErrorBoxed
;
62 mono_error_init (MonoError
*error
);
65 mono_error_init_flags (MonoError
*error
, unsigned short flags
);
68 mono_error_cleanup (MonoError
*error
);
71 mono_error_ok (MonoError
*error
);
73 MONO_API
unsigned short
74 mono_error_get_error_code (MonoError
*error
);
77 mono_error_get_message (MonoError
*error
);