simplified errorhandler registration.