use the builtin error handler when in debug mode