This chapter provides tutorial examples and notes on runtime error handling. Topics include the default error handling behavior; 'On Error Resume Next' and 'On Error GoTo 0' statements; catching errors with (Err.Number > 0); clear Err object with Err.Clear(); raise your own errors with Err.Raise(...).
Runtime errors will be managed by the host environment, if you don't manage them.
"On Error Resume Next" turns on the error handling flag, which causes the host environment to continue
executing the next statement after raising a runtime error.
"On Error GoTo 0" turns off the error handling flag, which causes the host environment to stop
executing the current procedure after raising a runtime error.
The "Err" object is built-in object representing the last runtime error.
"Err.Number > 0" can be used to see if a runtime error has occurred or not.
"Err.Clear()" method can be used to clear the "Err" object.
"Err.Raise()" method can be used to raise your own runtime errors.