Calling set_err() results in the next statement which is executed to fail with the loaded message - correct statement execution doesn't clear the error state.
There is a place (are places?) in myway.pl where set_err() is called to attempt to propagate a caught error up the stack - and this mostly works. However, I have just encountered an edge-case where a failing statement (in this case, calling ALTER TABLE ... ADD COLUMN with a column which already exists) causes the error to be output twice - once when it occurs, and once when the next statement successfully completes, potentially leading to a loss of state.
Ideally, the throw/catch mechanism emulated by calling set_err() can be removed entirely - but this will need to be thoroughly tested to ensure that nothing is lost in the process...
Calling
set_err()
results in the next statement which is executed to fail with the loaded message - correct statement execution doesn't clear the error state.There is a place (are places?) in myway.pl where
set_err()
is called to attempt to propagate a caught error up the stack - and this mostly works. However, I have just encountered an edge-case where a failing statement (in this case, callingALTER TABLE ... ADD COLUMN
with a column which already exists) causes the error to be output twice - once when it occurs, and once when the next statement successfully completes, potentially leading to a loss of state.Ideally, the throw/catch mechanism emulated by calling
set_err()
can be removed entirely - but this will need to be thoroughly tested to ensure that nothing is lost in the process...