void Exceptions::_throw_msg(Thread* thread, const char* file, int line, symbolHandle h_name, const char* message, Handle h_loader, Handle h_protection_domain) { // Check for special boot-strapping/vm-thread handling if (special_exception(thread, file, line, h_name, message)) return; // Create and throw exception Handle h_cause(thread, NULL); Handle h_exception = new_exception(thread, h_name, message, h_cause, h_loader, h_protection_domain); _throw(thread, file, line, h_exception, message); }
// Another convenience method that creates handles for null class loaders and // protection domains and null causes. // If the last parameter 'to_utf8_mode' is safe_to_utf8, // it means we can safely ignore the encoding scheme of the message string and // convert it directly to a java UTF8 string. Otherwise, we need to take the // encoding scheme of the string into account. One thing we should do at some // point is to push this flag down to class java_lang_String since other // classes may need similar functionalities. Handle Exceptions::new_exception(Thread* thread, Symbol* name, const char* message, ExceptionMsgToUtf8Mode to_utf8_safe) { Handle h_loader(thread, NULL); Handle h_prot(thread, NULL); Handle h_cause(thread, NULL); return Exceptions::new_exception(thread, name, message, h_cause, h_loader, h_prot, to_utf8_safe); }
void Exceptions::_throw_args(Thread* thread, const char* file, int line, symbolHandle h_name, symbolHandle h_signature, JavaCallArguments *args) { // Check for special boot-strapping/vm-thread handling if (special_exception(thread, file, line, h_name, NULL)) return; // Create and throw exception Handle h_loader(thread, NULL); Handle h_prot(thread, NULL); Handle h_cause(thread, NULL); Handle exception = new_exception(thread, h_name, h_signature, args, h_cause, h_loader, h_prot); _throw(thread, file, line, exception); }