X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmetadata%2Fexception.h;h=6575694c7c50ce37e9c0d903a89dabf869f3d3f4;hb=9d84dcb2fc35af1d75450045a8212bf5ab3ff383;hp=b9b82dd7427943455cfdd4bd0c4a53638f57f262;hpb=62c49f89ad1cc35593a00d909ea57bb41955288b;p=mono.git diff --git a/mono/metadata/exception.h b/mono/metadata/exception.h index b9b82dd7427..6575694c7c5 100644 --- a/mono/metadata/exception.h +++ b/mono/metadata/exception.h @@ -1,3 +1,7 @@ +/** + * \file + */ + #ifndef _MONO_METADATA_EXCEPTION_H_ #define _MONO_METADATA_EXCEPTION_H_ @@ -14,6 +18,7 @@ mono_exception_from_name (MonoImage *image, MONO_API MonoException * mono_exception_from_token (MonoImage *image, uint32_t token); +MONO_RT_EXTERNAL_ONLY MONO_API MonoException * mono_exception_from_name_two_strings (MonoImage *image, const char *name_space, const char *name, MonoString *a1, MonoString *a2); @@ -22,6 +27,7 @@ MONO_API MonoException * mono_exception_from_name_msg (MonoImage *image, const char *name_space, const char *name, const char *msg); +MONO_RT_EXTERNAL_ONLY MONO_API MonoException * mono_exception_from_token_two_strings (MonoImage *image, uint32_t token, MonoString *a1, MonoString *a2); @@ -103,6 +109,7 @@ mono_get_exception_io (const char *msg); MONO_API MonoException * mono_get_exception_file_not_found (MonoString *fname); +MONO_RT_EXTERNAL_ONLY MONO_API MonoException * mono_get_exception_file_not_found2 (const char *msg, MonoString *fname); @@ -122,6 +129,7 @@ mono_get_exception_appdomain_unloaded (void); MONO_API MonoException * mono_get_exception_bad_image_format (const char *msg); +MONO_RT_EXTERNAL_ONLY MONO_API MonoException * mono_get_exception_bad_image_format2 (const char *msg, MonoString *fname); @@ -145,6 +153,14 @@ MONO_RT_EXTERNAL_ONLY MONO_API MonoException * mono_get_exception_runtime_wrapped (MonoObject *wrapped_exception); +/* Installs a function which is called when the runtime encounters an unhandled exception. + * This hook isn't expected to return. + * If no hook has been installed, the runtime will print a message before aborting. + */ +typedef void (*MonoUnhandledExceptionFunc) (MonoObject *exc, void *user_data); +MONO_API void mono_install_unhandled_exception_hook (MonoUnhandledExceptionFunc func, void *user_data); +void mono_invoke_unhandled_exception_hook (MonoObject *exc); + MONO_END_DECLS #endif /* _MONO_METADATA_EXCEPTION_H_ */