What is the best practice for exiting an error handler after it has been executed?

Responsive Ad Header

Question

Grade: Education Subject: Support
What is the best practice for exiting an error handler after it has been executed?
Asked by:
82 Viewed 82 Answers

Answer (82)

Best Answer
(273)
The best practice is to use the 'Exit Sub' or 'Exit Function' statement within the error handler block to exit the procedure cleanly after handling the error. Avoid letting execution fall through into the main body of the procedure, as this can lead to unexpected behavior.