Use clearErrorHandler instead of resetErrorHandling