Mercurial > hg > truffle
diff src/share/vm/utilities/exceptions.cpp @ 12039:3cce976666d9
Merge hs25-b46
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Thu, 10 Oct 2013 14:20:04 +0200 |
parents | 291ffc492eb6 6e04c193845f |
children | d8041d695d19 |
line wrap: on
line diff
--- a/src/share/vm/utilities/exceptions.cpp Thu Oct 10 13:44:59 2013 +0200 +++ b/src/share/vm/utilities/exceptions.cpp Thu Oct 10 14:20:04 2013 +0200 @@ -125,13 +125,13 @@ } void Exceptions::_throw(Thread* thread, const char* file, int line, Handle h_exception, const char* message) { + ResourceMark rm; assert(h_exception() != NULL, "exception should not be NULL"); // tracing (do this up front - so it works during boot strapping) if (TraceExceptions) { ttyLocker ttyl; - ResourceMark rm; - tty->print_cr("Exception <%s>%s%s (" INTPTR_FORMAT " ) \n" + tty->print_cr("Exception <%s%s%s> (" INTPTR_FORMAT ") \n" "thrown [%s, line %d]\nfor thread " INTPTR_FORMAT, h_exception->print_value_string(), message ? ": " : "", message ? message : "", @@ -141,7 +141,9 @@ NOT_PRODUCT(Exceptions::debug_check_abort(h_exception, message)); // Check for special boot-strapping/vm-thread handling - if (special_exception(thread, file, line, h_exception)) return; + if (special_exception(thread, file, line, h_exception)) { + return; + } assert(h_exception->is_a(SystemDictionary::Throwable_klass()), "exception is not a subclass of java/lang/Throwable"); @@ -149,7 +151,9 @@ thread->set_pending_exception(h_exception(), file, line); // vm log - Events::log_exception(thread, "Threw " INTPTR_FORMAT " at %s:%d", (address)h_exception(), file, line); + Events::log_exception(thread, "Exception <%s%s%s> (" INTPTR_FORMAT ") thrown at [%s, line %d]", + h_exception->print_value_string(), message ? ": " : "", message ? message : "", + (address)h_exception(), file, line); }