* reflection.c (inflate_mono_method): Reuse method instantiation
[mono.git] / mono / metadata / exception.c
index 12cf8713748895e9b1c1c8297a4d48052a380e8a..b3bc6652efb4f917e1a88941fd5c4b38bbb6177f 100644 (file)
@@ -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:
  *