Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Throw X::Method::NotFound on JVM.
  • Loading branch information
jnthn committed Sep 25, 2013
1 parent cc5e06f commit 3d25fb3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/core/Exception.pm
Expand Up @@ -98,6 +98,10 @@ sub EXCEPTION(|) {
my $ex;
#?if parrot
if $type == pir::const::EXCEPTION_METHOD_NOT_FOUND &&
#?endif
#?if !parrot
if
#?endif
nqp::p6box_s(nqp::getmessage($vm_ex)) ~~ /"Method '" (.*?) "' not found for invocant of class '" (.+)\'$/ {

$ex := X::Method::NotFound.new(
Expand All @@ -106,12 +110,10 @@ sub EXCEPTION(|) {
);
}
else {
#?endif

$ex := nqp::create(X::AdHoc);
nqp::bindattr($ex, X::AdHoc, '$!payload', nqp::p6box_s(nqp::getmessage($vm_ex)));
#?if parrot
}
#?endif
nqp::bindattr($ex, Exception, '$!ex', $vm_ex);
$ex;
}
Expand Down
2 changes: 1 addition & 1 deletion tools/build/NQP_REVISION
@@ -1 +1 @@
2013.09-15-g82ea40f
2013.09-16-g4280732

0 comments on commit 3d25fb3

Please sign in to comment.