Skip to content

Commit

Permalink
fix the rethrow and message. thanks jnthn++
Browse files Browse the repository at this point in the history
  • Loading branch information
timo committed Jan 18, 2013
1 parent d270cb1 commit 3825b6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/Exception.pm
Expand Up @@ -213,7 +213,7 @@ do {
$_() for pir::perl6ize_type__PP(@*END_PHASERS);
}
if $! {
pir::perl6_based_rethrow__0PP(nqp::getattr($!, Exception, '$!ex'), $ex);
pir::perl6_based_rethrow__0PP(nqp::getattr(nqp::p6decont($!), Exception, '$!ex'), $ex);
}
}

Expand Down Expand Up @@ -1043,7 +1043,7 @@ my class X::Inheritance::UnknownParent is Exception {
method message {
my $message := $.child ~ ' cannot inherit from ' ~ $.parent ~ ' because it is unknown.';
if +@.suggestions > 1 {
$message := $message ~ "\nDid you mean one of these?\n " ~ nqp::join("\n ", @.suggestions);
$message := $message ~ "\nDid you mean one of these?\n " ~ @.suggestions.join("\n ");
} elsif +@.suggestions == 1 {
$message := $message ~ "\nDid you mean " ~ @.suggestions[0];
}
Expand Down

0 comments on commit 3825b6f

Please sign in to comment.