Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make better use of ExceptionHandling.dieInternal() in NativeCallOps.
  • Loading branch information
arnsholt committed Feb 16, 2014
1 parent 84497ec commit 8c67bb1
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/vm/jvm/runtime/org/perl6/nqp/runtime/NativeCallOps.java
Expand Up @@ -131,11 +131,8 @@ private static Class javaType(ThreadContext tc, ArgType target, SixModelObject s
case CSTRUCT:
return ((CStructREPRData) smoType.st.REPRData).structureClass;
default:
ExceptionHandling.dieInternal(tc, String.format("Don't know correct Java class for %s arguments yet", target));
throw ExceptionHandling.dieInternal(tc, String.format("Don't know correct Java class for %s arguments yet", target));
}

/* And a dummy return to placate the Java flow analysis. */
return null;
}

public static Object toJNAType(ThreadContext tc, SixModelObject o, ArgType target) {
Expand Down Expand Up @@ -174,11 +171,8 @@ public static Object toJNAType(ThreadContext tc, SixModelObject o, ArgType targe
case CSTRUCT:
return ((CStructInstance) o).storage;
default:
ExceptionHandling.dieInternal(tc, String.format("Don't know how to convert %s arguments to JNA yet", target));
throw ExceptionHandling.dieInternal(tc, String.format("Don't know how to convert %s arguments to JNA yet", target));
}

/* And a dummy return to placate the Java flow analysis. */
return null;
}

public static SixModelObject toNQPType(ThreadContext tc, ArgType target, SixModelObject type, Object o) {
Expand Down Expand Up @@ -247,7 +241,7 @@ public static SixModelObject toNQPType(ThreadContext tc, ArgType target, SixMode
break;
}
default:
ExceptionHandling.dieInternal(tc, String.format("Don't know how to convert %s arguments to NQP yet", target));
throw ExceptionHandling.dieInternal(tc, String.format("Don't know how to convert %s arguments to NQP yet", target));
}

return nqpobj;
Expand Down

0 comments on commit 8c67bb1

Please sign in to comment.