[2020-02] Fix leak in assembly-specific dllmap lookups (#21053)
[mono-project.git] / mono / metadata / exception-internals.h
blob7164ffc0797fdd7d4a183e1bbc25cabc8d5407b7
1 /**
2 * \file
3 */
5 #ifndef _MONO_METADATA_EXCEPTION_INTERNALS_H_
6 #define _MONO_METADATA_EXCEPTION_INTERNALS_H_
8 #include <glib.h>
10 #include <mono/metadata/object.h>
11 #include <mono/metadata/handle.h>
12 #include <mono/utils/mono-error.h>
14 MonoExceptionHandle
15 mono_get_exception_type_initialization_handle (const gchar *type_name, MonoExceptionHandle inner, MonoError *error);
17 MonoExceptionHandle
18 mono_get_exception_reflection_type_load_checked (MonoArrayHandle types, MonoArrayHandle exceptions, MonoError *error);
20 MonoExceptionHandle
21 mono_get_exception_runtime_wrapped_handle (MonoObjectHandle wrapped_exception, MonoError *error);
23 MonoExceptionHandle
24 mono_exception_from_name_two_strings_checked (MonoImage *image, const char *name_space,
25 const char *name, MonoStringHandle a1, MonoStringHandle a2,
26 MonoError *error);
28 MonoExceptionHandle
29 mono_exception_from_token_two_strings_checked (MonoImage *image, uint32_t token,
30 MonoStringHandle a1, MonoStringHandle a2,
31 MonoError *error);
33 typedef int (*MonoGetSeqPointFunc) (MonoDomain *domain, MonoMethod *method, gint32 native_offset);
35 void
36 mono_install_get_seq_point (MonoGetSeqPointFunc func);
38 void
39 mono_error_set_method_missing (MonoError *error, MonoClass *klass, const char *method_name, MonoMethodSignature *sig, const char *reason, ...) MONO_ATTR_FORMAT_PRINTF(5,6);
41 void
42 mono_error_set_field_missing (MonoError *oerror, MonoClass *klass, const char *field_name, MonoType *sig, const char *reason, ...) MONO_ATTR_FORMAT_PRINTF(5,6);
44 void
45 mono_error_set_bad_image (MonoError *error, MonoImage *image, const char *msg_format, ...) MONO_ATTR_FORMAT_PRINTF(3,4);
47 void
48 mono_error_set_bad_image_by_name (MonoError *error, const char *image_name, const char *msg_format, ...) MONO_ATTR_FORMAT_PRINTF(3,4);
50 void
51 mono_error_set_file_not_found (MonoError *oerror, const char *file_name, const char *msg_format, ...) MONO_ATTR_FORMAT_PRINTF(3,4);
53 void
54 mono_error_set_simple_file_not_found (MonoError *oerror, const char *assembly_name, gboolean refection_only);
56 MonoExceptionHandle
57 mono_corlib_exception_new_with_args (const char *name_space, const char *name, const char *arg_0, const char *arg_1, MonoError *error);
59 MonoExceptionHandle
60 mono_exception_new_by_name_msg (MonoImage *image, const char *name_space,
61 const char *name, const char *msg, MonoError *error);
63 MonoExceptionHandle
64 mono_exception_new_argument (const char *arg, const char *msg, MonoError *error);
66 MonoExceptionHandle
67 mono_exception_new_argument_null (const char *arg, MonoError *error);
69 MonoExceptionHandle
70 mono_exception_new_argument_out_of_range(const char *arg, const char *msg, MonoError *error);
72 MonoExceptionHandle
73 mono_exception_new_thread_interrupted (MonoError *error);
75 MonoExceptionHandle
76 mono_exception_new_thread_abort (MonoError *error);
78 MonoExceptionHandle
79 mono_exception_new_serialization (const char *msg, MonoError *error);
81 MonoExceptionHandle
82 mono_exception_new_invalid_operation (const char *msg, MonoError *error);
84 MonoExceptionHandle
85 mono_error_convert_to_exception_handle (MonoError *error);
87 MonoExceptionHandle
88 mono_get_exception_out_of_memory_handle (void);
90 #endif