Skip to content

Commit

Permalink
refs #380 fixed the test, updated comments
Browse files Browse the repository at this point in the history
  • Loading branch information
davidnich committed Jan 26, 2016
1 parent 3bb0ed2 commit 18fd863
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/test/qore/vars/statement.qtest
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ class StatementTest inherits QUnit::Test {
# bug 380: on_(exit|error) need to be run even if there is an active exception
int i = 0;
try {
on_exit
on_error
++i;
on_error {
on_exit {
++i;
throw True;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/StatementBlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ int StatementBlock::execIntern(QoreValue& return_value, ExceptionSink* xsink) {
if ((*i).second) {
nrc = (*i).second->execImpl(return_value, &obe_xsink);
// bug 380: make sure and merge every exception after every conditional execution to ensure
// that all on_(exit|success) statements are executed
// that all on_(exit|error) statements are executed even if exceptions are thrown
if (obe_xsink) {
xsink->assimilate(obe_xsink);
if (!error)
Expand Down

0 comments on commit 18fd863

Please sign in to comment.