Skip to content

Commit

Permalink
make backtraces a bit less noisy
Browse files Browse the repository at this point in the history
Hopefully marking line numbers with the word "line" makes their purpose more
obvious.
  • Loading branch information
moritz committed Oct 10, 2009
1 parent bd7966f commit 4cdac8a
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions perl6.pir
Expand Up @@ -326,20 +326,21 @@ and report exceptions.
.sub 'format_location'
.param pmc cur_block
.local pmc anno
.local string file
.local string line
anno = cur_block['annotations']
if null anno goto unknown
$S1 = anno['file']
if $S1 != "" goto have_file
$S1 = "<unknown>"
file = anno['file']
if file != "" goto have_file
file = "<unknown>"
have_file:
$S0 = concat "(", $S1
concat $S0, ":"
$S1 = anno['line']
if $S1 != "" goto have_line
if $S0 == "(<unknown>:" goto unknown
$S1 = "<unknown>"
line = anno['line']
if line != "" goto have_line
line = "<unknown>"
have_line:
concat $S0, $S1
$S0 = concat "(file " , file
concat $S0, ", line "
concat $S0, line
concat $S0, ")"
.return ($S0)
unknown:
Expand Down

0 comments on commit 4cdac8a

Please sign in to comment.