Skip to content

Commit

Permalink
Error reporting tweak.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Apr 25, 2013
1 parent 12b0eb8 commit d228c92
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java
Expand Up @@ -2786,10 +2786,13 @@ public static long getextype(SixModelObject obj, ThreadContext tc) {
throw ExceptionHandling.dieInternal(tc, "getextype needs an object with VMException representation");
}
public static String getmessage(SixModelObject obj, ThreadContext tc) {
if (obj instanceof VMExceptionInstance)
return ((VMExceptionInstance)obj).message;
else
if (obj instanceof VMExceptionInstance) {
String msg = ((VMExceptionInstance)obj).message;
return msg == null ? "Died" : msg;
}
else {
throw ExceptionHandling.dieInternal(tc, "getmessage needs an object with VMException representation");
}
}
public static SixModelObject getpayload(SixModelObject obj, ThreadContext tc) {
if (obj instanceof VMExceptionInstance)
Expand Down

0 comments on commit d228c92

Please sign in to comment.