* is_running_protected_wrapper () in threads.c and
* mono_marshal_get_remoting_invoke () in remoting.c)
*/
- mono_error_raise_exception (&error);
+ mono_error_raise_exception (&error); /* OK to throw, see note */
return NULL;
}
/* mono_marshal_xdomain_copy_out_value()
* Copies the contents of the src instance into the dst instance. src and dst
* must have the same type, and if they are arrays, the same size.
+ *
+ * This is an icall, it may use mono_error_set_pending_exception
*/
static void
mono_marshal_xdomain_copy_out_value (MonoObject *src, MonoObject *dst)
for (i = 0; i < len; i++) {
MonoObject *item = (MonoObject *)mono_array_get ((MonoArray *)src, gpointer, i);
MonoObject *item_copy = mono_marshal_xdomain_copy_value (item, &error);
- mono_error_raise_exception (&error); /* FIXME don't raise here */
+ if (mono_error_set_pending_exception (&error))
+ return;
mono_array_setref ((MonoArray *)dst, i, item_copy);
}
} else {
else
marshal_method = mono_marshal_get_remoting_invoke (method);
gpointer compiled_ptr = mono_compile_method_checked (marshal_method, &error);
- mono_error_raise_exception (&error); /* FIXME don't raise here */
+ mono_error_assert_ok (&error);
return compiled_ptr;
}
void
mono_upgrade_remote_class_wrapper (MonoReflectionType *rtype, MonoTransparentProxy *tproxy)
{
+ MonoError error;
MonoClass *klass;
MonoDomain *domain = ((MonoObject*)tproxy)->vtable->domain;
klass = mono_class_from_mono_type (rtype->type);
- mono_upgrade_remote_class (domain, (MonoObject*)tproxy, klass);
+ mono_upgrade_remote_class (domain, (MonoObject*)tproxy, klass, &error);
+ mono_error_set_pending_exception (&error);
}
#else /* DISABLE_REMOTING */