File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
src/main/java/org/truffleruby Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ public static String getMessage(Throwable throwable) {
97
97
}
98
98
99
99
@ TruffleBoundary
100
- private static String messageFieldToString (RubyException exception ) {
100
+ public static String messageFieldToString (RubyException exception ) {
101
101
Object message = exception .message ;
102
102
RubyStringLibrary strings = RubyStringLibrary .getUncached ();
103
103
if (message == null || message == Nil .INSTANCE ) {
@@ -115,7 +115,7 @@ public static String messageToString(RubyException exception) {
115
115
Object messageObject = null ;
116
116
try {
117
117
messageObject = DispatchNode .getUncached ().call (exception , "message" );
118
- } catch (Throwable e ) {
118
+ } catch (RaiseException e ) {
119
119
// Fall back to the internal message field
120
120
}
121
121
if (messageObject != null && RubyStringLibrary .getUncached ().isRubyString (messageObject )) {
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ public RubyException getException() {
53
53
54
54
@ Override
55
55
public String getMessage () {
56
- return ExceptionOperations .messageToString (exception );
56
+ return ExceptionOperations .messageFieldToString (exception );
57
57
}
58
58
59
59
}
You can’t perform that action at this time.
0 commit comments