-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
When doing jump from try { } or catch { } block outside of block then finally is not called.
Example 1:
use Try::Catch;
for (1) {
try {
last;
} catch {
} finally {
print "finally was called\n";
}
}
Example 2:
use Try::Catch;
for (1) {
try {
die;
} catch {
goto skip;
} finally {
print "finally was called\n";
}
}
skip:
finally was called is never printed even it was specified in finally { } block which should be always called.
When both examples are used with Try::Tiny instead Try::Catch then examples correctly print finally was called.
This makes finally { } block with Try::Catch totally unusable.
Metadata
Metadata
Assignees
Labels
No labels