X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmetadata%2Fexception.c;h=b3bc6652efb4f917e1a88941fd5c4b38bbb6177f;hb=f33e2fece0b056ea82643f7c3074aaadf07c67a4;hp=12cf8713748895e9b1c1c8297a4d48052a380e8a;hpb=00e065484e866f3a0349c882f804c4a79a13ee5c;p=mono.git diff --git a/mono/metadata/exception.c b/mono/metadata/exception.c index 12cf8713748..b3bc6652efb 100644 --- a/mono/metadata/exception.c +++ b/mono/metadata/exception.c @@ -204,6 +204,18 @@ mono_get_exception_thread_abort () "ThreadAbortException"); } +/** + * mono_get_exception_thread_interrupted: + * + * Returns: a new instance of the System.Threading.ThreadInterruptedException. + */ +MonoException * +mono_get_exception_thread_interrupted () +{ + return mono_exception_from_name (mono_get_corlib (), "System.Threading", + "ThreadInterruptedException"); +} + /** * mono_get_exception_arithmetic: * @@ -594,6 +606,22 @@ mono_get_exception_bad_image_format (const char *msg) return mono_exception_from_name_msg (mono_get_corlib (), "System", "BadImageFormatException", msg); } +/** + * mono_get_exception_bad_image_format2: + * @msg: an informative message for the user. + * @fname: The full name of the file with the invalid image. + * + * Returns: a new instance of the System.BadImageFormatException + */ +MonoException * +mono_get_exception_bad_image_format2 (const char *msg, MonoString *fname) +{ + MonoString *s = msg ? mono_string_new (mono_domain_get (), msg) : NULL; + + return mono_exception_from_name_two_strings ( + mono_get_corlib (), "System", "BadImageFormatException", s, fname); +} + /** * mono_get_exception_stack_overflow: *