Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / mini / exceptions-sparc.c
index d9b3d9d99c658bfc396ef0e01aa21af3633d7a03..f7010b13f88e4873928d655ee63ddb576e9a7b28 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * exceptions-sparc.c: exception support for sparc
+/**
+ * \file
+ * exception support for sparc
  *
  * Authors:
  *   Mark Crichton (crichton@gimp.org)
@@ -166,6 +167,7 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
 static void
 throw_exception (MonoObject *exc, gpointer sp, gpointer ip, gboolean rethrow)
 {
+       MonoError error;
        MonoContext ctx;
        static void (*restore_context) (MonoContext *);
        gpointer *window;
@@ -178,13 +180,14 @@ throw_exception (MonoObject *exc, gpointer sp, gpointer ip, gboolean rethrow)
        ctx.ip = ip;
        ctx.fp = (gpointer*)(MONO_SPARC_WINDOW_ADDR (sp) [sparc_i6 - 16]);
 
-       if (mono_object_isinst (exc, mono_defaults.exception_class)) {
+       if (mono_object_isinst_checked (exc, mono_defaults.exception_class, &error)) {
                MonoException *mono_ex = (MonoException*)exc;
                if (!rethrow) {
                        mono_ex->stack_trace = NULL;
                        mono_ex->trace_ips = NULL;
                }
        }
+       mono_error_assert_ok (&error);
        mono_handle_exception (&ctx, exc);
        restore_context (&ctx);
 
@@ -218,8 +221,7 @@ get_throw_exception (gboolean rethrow)
 
 /**
  * mono_arch_get_throw_exception:
- *
- * Returns a function pointer which can be used to raise exceptions.
+ * \returns a function pointer which can be used to raise exceptions.
  * The returned function has the following 
  * signature: void (*func) (MonoException *exc); 
  */
@@ -265,8 +267,7 @@ mono_arch_get_rethrow_exception (MonoTrampInfo **info, gboolean aot)
 
 /**
  * mono_arch_get_throw_corlib_exception:
- *
- * Returns a function pointer which can be used to raise 
+ * \returns a function pointer which can be used to raise 
  * corlib exceptions. The returned function has the following 
  * signature: void (*func) (guint32 ex_token, guint32 offset); 
  * Here, offset is the offset which needs to be substracted from the caller IP