Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Only include position pointer if we have $.pre.
Avoids spitting out compile-time errors with a "----->" followed by
nothing.
  • Loading branch information
jnthn committed Apr 8, 2015
1 parent 16ca41b commit f1cf715
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/Exception.pm
Expand Up @@ -370,8 +370,8 @@ my role X::Comp is Exception {
!! ("", "", "", "");
my $eject = $is-win ?? "<HERE>" !! "\x[23CF]";
my $r = $sorry ?? self.sorry_heading() !! "";
$r ~= "$.message\nat $.filename():$.line\n------> ";
$r ~= "$green$.pre$yellow$eject$red$.post$clear" if defined $.pre;
$r ~= "$.message\nat $.filename():$.line";
$r ~= "\n------> $green$.pre$yellow$eject$red$.post$clear" if defined $.pre;
if $expect && @.highexpect {
$r ~= "\n expecting any of:";
for @.highexpect {
Expand Down

0 comments on commit f1cf715

Please sign in to comment.