/** * mono_exception_from_name_two_strings: * @image: the Mono image where to look for the class * @name_space: the namespace for the class * @name: class name * @a1: first string argument to pass * @a2: second string argument to pass * * Creates an exception from a constructor that takes two string * arguments. * * Returns: the initialized exception instance. */ MonoException * mono_exception_from_name_two_strings (MonoImage *image, const char *name_space, const char *name, MonoString *a1, MonoString *a2) { MonoClass *klass = mono_class_load_from_name (image, name_space, name); return create_exception_two_strings (klass, a1, a2); }
/** * mono_exception_from_token_two_strings: * * Same as mono_exception_from_name_two_strings, but lookup the exception class using * IMAGE and TOKEN. */ MonoException * mono_exception_from_token_two_strings (MonoImage *image, guint32 token, MonoString *a1, MonoString *a2) { MonoClass *klass = mono_class_get (image, token); return create_exception_two_strings (klass, a1, a2); }
/** * mono_exception_from_token_two_strings: * * Same as mono_exception_from_name_two_strings, but lookup the exception class using * IMAGE and TOKEN. */ MonoException * mono_exception_from_token_two_strings (MonoImage *image, guint32 token, MonoString *a1, MonoString *a2) { MonoError error; MonoClass *klass = mono_class_get_checked (image, token, &error); g_assert (mono_error_ok (&error)); /* FIXME handle the error. */ return create_exception_two_strings (klass, a1, a2); }
/** * mono_exception_from_name_two_strings_checked: * @image: the Mono image where to look for the class * @name_space: the namespace for the class * @name: class name * @a1: first string argument to pass * @a2: second string argument to pass * @error: set on error * * Creates an exception from a constructor that takes two string * arguments. * * Returns: the initialized exception instance. On failure returns * NULL and sets @error. */ MonoException * mono_exception_from_name_two_strings_checked (MonoImage *image, const char *name_space, const char *name, MonoString *a1, MonoString *a2, MonoError *error) { MonoClass *klass; mono_error_init (error); klass = mono_class_load_from_name (image, name_space, name); return create_exception_two_strings (klass, a1, a2, error); }
/** * mono_exception_from_token_two_strings_checked: * * Same as mono_exception_from_name_two_strings, but lookup the exception class using * IMAGE and TOKEN. */ MonoException * mono_exception_from_token_two_strings_checked (MonoImage *image, guint32 token, MonoString *a1, MonoString *a2, MonoError *error) { MonoClass *klass; mono_error_init (error); klass = mono_class_get_checked (image, token, error); mono_error_assert_ok (error); /* FIXME handle the error. */ return create_exception_two_strings (klass, a1, a2, error); }
/** * mono_exception_from_name_two_strings_checked: * \param image the Mono image where to look for the class * \param name_space the namespace for the class * \param name class name * \param a1 first string argument to pass * \param a2 second string argument to pass * \param error set on error * * Creates an exception from a constructor that takes two string * arguments. * * \returns the initialized exception instance. On failure returns * NULL and sets \p error. */ MonoExceptionHandle mono_exception_from_name_two_strings_checked (MonoImage *image, const char *name_space, const char *name, MonoStringHandle a1, MonoStringHandle a2, MonoError *error) { HANDLE_FUNCTION_ENTER (); MonoClass *klass; error_init (error); klass = mono_class_load_from_name (image, name_space, name); HANDLE_FUNCTION_RETURN_REF (MonoException, create_exception_two_strings (klass, a1, a2, error)); }
/** * mono_exception_from_name_two_strings: * @image: the Mono image where to look for the class * @name_space: the namespace for the class * @name: class name * @a1: first string argument to pass * @a2: second string argument to pass * * Creates an exception from a constructor that takes two string * arguments. * * Returns: the initialized exception instance. */ MonoException * mono_exception_from_name_two_strings (MonoImage *image, const char *name_space, const char *name, MonoString *a1, MonoString *a2) { MonoError error; MonoClass *klass; MonoException *ret; klass = mono_class_load_from_name (image, name_space, name); ret = create_exception_two_strings (klass, a1, a2, &error); mono_error_raise_exception (&error); /* FIXME don't raise here */ return ret; }
/** * mono_exception_from_token_two_strings_checked: * * Same as mono_exception_from_name_two_strings, but lookup the exception class using * IMAGE and TOKEN. */ MonoExceptionHandle mono_exception_from_token_two_strings_checked (MonoImage *image, guint32 token, MonoStringHandle a1, MonoStringHandle a2, MonoError *error) { HANDLE_FUNCTION_ENTER (); MonoClass *klass; error_init (error); klass = mono_class_get_checked (image, token, error); mono_error_assert_ok (error); /* FIXME handle the error. */ HANDLE_FUNCTION_RETURN_REF (MonoException, create_exception_two_strings (klass, a1, a2, error)); }
/** * mono_exception_from_token_two_strings: * * Same as mono_exception_from_name_two_strings, but lookup the exception class using * IMAGE and TOKEN. */ MonoException * mono_exception_from_token_two_strings (MonoImage *image, guint32 token, MonoString *a1, MonoString *a2) { MonoError error; MonoClass *klass; MonoException *ret; klass = mono_class_get_checked (image, token, &error); mono_error_assert_ok (&error); /* FIXME handle the error. */ ret = create_exception_two_strings (klass, a1, a2, &error); mono_error_raise_exception (&error); /* FIXME don't raise here */ return ret; }