Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix control exception catcher

  • Loading branch information...
commit 47497c46e02fb4b80feb20e25c84eae2cd0bbfa9 1 parent 8254a60
Moritz Lenz moritz authored
Showing with 7 additions and 7 deletions.
  1. +7 −7 src/core/Exception.pm
14 src/core/Exception.pm
View
@@ -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");
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.