Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use default to mark exceptions as handled
  • Loading branch information
vendethiel committed Apr 5, 2014
1 parent 57c7c92 commit 5493dc6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions S03-operators/orelse.t
Expand Up @@ -15,15 +15,15 @@ nok $tracker, 'orelse thunks';
{
try {
die "oh noes!" orelse pass("orelse continues after an exception");
CATCH { flunk "orelse shouldn't rethrow exceptions" }
CATCH { default { flunk "orelse shouldn't rethrow exceptions" } }
}
}

#?rakudo todo "orelse exception semantics"
{
try {
die "oh noes!" orelse ok(~$! eq "oh noes!", "orelse sets $! after an exception");
CATCH { flunk "orelse shouldn't rethrow exceptions" }
CATCH { default { flunk "orelse shouldn't rethrow exceptions" } }
}
}

Expand All @@ -33,7 +33,7 @@ nok $tracker, 'orelse thunks';
die "oh noes!" orelse -> $foo {
ok ~$foo eq "oh noes!", "orelse passes $! to one argument after an exception";
};
CATCH { flunk "orelse shouldn't rethrow exceptions" }
CATCH { default { flunk "orelse shouldn't rethrow exceptions" } }
}
}

Expand All @@ -43,7 +43,7 @@ nok $tracker, 'orelse thunks';
die "oh noes!" orelse -> $foo, $bar {
ok ~$foo eq "oh noes!" && ~$bar eq "oh noes!", "orelse passes $! to two arguments after an exception";
};
CATCH { flunk "orelse shouldn't rethrow exceptions" }
CATCH { default { flunk "orelse shouldn't rethrow exceptions" } }
}
}

Expand Down

0 comments on commit 5493dc6

Please sign in to comment.