Created
September 27, 2016 21:34
-
-
Save usev6/8d8f77399587404afb6b555134ac479f to your computer and use it in GitHub Desktop.
half-revert 222d16b0b9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/core/Exception.pm b/src/core/Exception.pm | |
index d7e2957..ee6f29b3 100644 | |
--- a/src/core/Exception.pm | |
+++ b/src/core/Exception.pm | |
@@ -276,6 +276,15 @@ sub EXCEPTION(|) { | |
elsif $type == nqp::const::CONTROL_RETURN { | |
$ex := CX::Return.new(); | |
} | |
+#?if !moar | |
+ elsif !nqp::isnull_s(nqp::getmessage($vm_ex)) && | |
+ nqp::p6box_s(nqp::getmessage($vm_ex)) ~~ /"Method '" (.*?) "' not found for invocant of class '" (.+)\'$/ { | |
+ $ex := X::Method::NotFound.new( | |
+ method => ~$0, | |
+ typename => ~$1, | |
+ ); | |
+ } | |
+#?endif | |
else { | |
$ex := nqp::create(X::AdHoc); | |
nqp::bindattr($ex, X::AdHoc, '$!payload', nqp::p6box_s(nqp::getmessage($vm_ex) // 'unknown exception')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment