Skip to content

Commit

Permalink
fix control exception catcher
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed May 17, 2012
1 parent 8254a60 commit 47497c4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/core/Exception.pm
Expand Up @@ -130,26 +130,26 @@ do {
$resume();
}
}
if $type == pir::const::CONTROL_RETURN() {
if ($type == pir::const::CONTROL_RETURN) {
die("stray return control exception");
}
if $type == pir::const::CONTROL_LOOP_LAST() {
if ($type == pir::const::CONTROL_LOOP_LAST) {
die("last without loop construct");
}
if $type == pir::const::CONTROL_LOOP_NEXT() {
if ($type == pir::const::CONTROL_LOOP_NEXT) {
die("next without loop construct");
}
if $type == pir::const::CONTROL_LOOP_REDO() {
if ($type == pir::const::CONTROL_LOOP_REDO) {
die("redo without loop construct");
}
if $type == pir::const::CONTROL_CONTINUE() {
if ($type == pir::const::CONTROL_CONTINUE) {
die("proceed without when clause");
}
if $type == pir::const::CONTROL_BREAK() {
if ($type == pir::const::CONTROL_BREAK) {
# XXX: should work like leave() ?
die("succeed without when clause");
}
if $type == pir::const::CONTROL_TAKE() {
if ($type == pir::const::CONTROL_TAKE) {
die("stray take statement");
}
}
Expand Down

0 comments on commit 47497c4

Please sign in to comment.