Permalink
Browse files

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 b4309113e879ace505aa25d86042ee8dc1cbfa66
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/core/Exception.pm
View
@@ -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;
}

0 comments on commit b430911

Please sign in to comment.