Skip to content

Commit

Permalink
better error message when getting wrong exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Carl Masak committed Jan 19, 2015
1 parent 716eb9a commit 5bf62a2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/_007/Test.pm
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ sub parse-error($program, $expected-error, $desc = $expected-error.^name) is exp
when $expected-error {
pass $desc;
}
default {
is .^name, $expected-error.^name; # which we know will flunk
return;
}
}
flunk $desc;
}
Expand Down

0 comments on commit 5bf62a2

Please sign in to comment.