Application.handle_error() method