Add error method to BasicErrorHandler