Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add line numbers for warnings
does not yet do the right things for warnings thrown from inside the setting, but warn() calls should be fine
  • Loading branch information
moritz committed Apr 10, 2012
1 parent 72e8fe8 commit 4bacf1a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/Exception.pm
Expand Up @@ -99,7 +99,9 @@ do {
if ($type == nqp::p6box_i(pir::const::CONTROL_OK)) {
my Mu $err := pir::getstderr__P();
my $msg = nqp::p6box_s(nqp::atkey($ex, 'message'));
$err.print: $msg ?? "$msg\n" !! "Warning\n";
$err.print: $msg ?? "$msg" !! "Warning";
$err.print: Backtrace.new($ex.backtrace, 0).nice(:oneline);
$err.print: "\n";
my $resume := nqp::atkey($ex, 'resume');
if ($resume) {
$resume();
Expand Down

0 comments on commit 4bacf1a

Please sign in to comment.