src/share/vm/interpreter/interpreterRuntime.cpp

changeset 9970
f614bd5c9561
parent 9301
d47844b56aaf
child 10015
eb7ce841ccec
     1.1 --- a/src/share/vm/interpreter/interpreterRuntime.cpp	Thu Aug 25 09:23:45 2016 -0400
     1.2 +++ b/src/share/vm/interpreter/interpreterRuntime.cpp	Wed Jul 09 22:37:48 2014 -0400
     1.3 @@ -447,9 +447,18 @@
     1.4  
     1.5      // tracing
     1.6      if (TraceExceptions) {
     1.7 -      ttyLocker ttyl;
     1.8        ResourceMark rm(thread);
     1.9 -      tty->print_cr("Exception <%s> (" INTPTR_FORMAT ")", h_exception->print_value_string(), (address)h_exception());
    1.10 +      Symbol* message = java_lang_Throwable::detail_message(h_exception());
    1.11 +      ttyLocker ttyl;  // Lock after getting the detail message
    1.12 +      if (message != NULL) {
    1.13 +        tty->print_cr("Exception <%s: %s> (" INTPTR_FORMAT ")",
    1.14 +                      h_exception->print_value_string(), message->as_C_string(),
    1.15 +                      (address)h_exception());
    1.16 +      } else {
    1.17 +        tty->print_cr("Exception <%s> (" INTPTR_FORMAT ")",
    1.18 +                      h_exception->print_value_string(),
    1.19 +                      (address)h_exception());
    1.20 +      }
    1.21        tty->print_cr(" thrown in interpreter method <%s>", h_method->print_value_string());
    1.22        tty->print_cr(" at bci %d for thread " INTPTR_FORMAT, current_bci, thread);
    1.23      }

mercurial