Enclose user-invoked handlers code with try-catch clauses