Permalink
Browse files

Panic if we cannot make the exception object

  • Loading branch information...
1 parent 25398b8 commit 20d5a68a061819b48e7c8fbb391423d658099722 @lizmat lizmat committed Sep 21, 2013
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/Perl6/World.nqp
View
@@ -2445,6 +2445,7 @@ class Perl6::World is HLL::World {
}
};
+ my $exception;
if $type_found {
# If the highwater is beyond the current position, force the cursor to
# that location.
@@ -2511,8 +2512,9 @@ class Perl6::World is HLL::World {
(nqp::isnull($file) ?? '<unknown file>' !! $file),
self.find_symbol(['Str'])
);
- return $ex.new(|%opts);
- } else {
+ try { $exception := $ex.new(|%opts) }
+ }
+ if !$exception {
my @err := ['Error while compiling, type ', join('::', $ex_type), "\n"];
for %opts -> $key {
@err.push: ' ';

0 comments on commit 20d5a68

Please sign in to comment.