Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix exception printing by boxing line number
A BOOTInt sneaked into it before, so the exeption exploded at the
attempt of being printed, like when we 'use'd a module that had a
syntax error in it.
  • Loading branch information
FROGGS committed Jun 17, 2014
1 parent 0c861ba commit b430911
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/Exception.pm
Expand Up @@ -402,9 +402,10 @@ my role X::Comp is Exception {
}
}
for @.modules.reverse[1..*] {
my $line = nqp::p6box_i($_<line>);
$r ~= $_<module>.defined
?? "\n from module $_<module> ($_<filename>:$_<line>)"
!! "\n from $_<filename>:$_<line>";
?? "\n from module $_<module> ($_<filename>:$line)"
!! "\n from $_<filename>:$line";
}
$r;
}
Expand Down

0 comments on commit b430911

Please sign in to comment.