|
Post by Brandon Parker on Aug 13, 2019 14:15:50 GMT -5
Carl, When the "Exit Sub"/ "Exit Function" commands are issued within an Error Handler block inside a Subroutine/ Function, there seems to be an issue. The Exit commands work when they are not inside an Error Handler scope. The Exit commands also do no cause an issue when they are inside an Error Handler scope, inside a Sub/ Function, when an actual error occurs (ex. divide by zero), and the error handler works as expected. When there is an Error Handler inside a Sub/ Function and there is no error LB5.350 throws a "No SUB to EXIT." error when it encounters the "Exit Sub"/ "Exit Function" command(s).
Here is some code...
Call testErrorHandler 3.0, 1 'Call testErrorHandler 3.0, 0 Print "Finished!" End
Sub testErrorHandler num, den On Error GoTo [subError] Print num/ den Exit sub [subError] Print Err$;" : ";Err End Sub
{:0)
Brandon Parker
|
|