Message user and redirect on error.
345971
def handle_login_failure(self, provider, reason):
        """"""
        logger.error('Authenication Failure: {0}'.format(reason))
        messages.error(self.request, 'Authenication Failed. Please try again')
        return redirect(self.get_error_redirect(provider, reason))
335700
def error(self, msgid, error):
        """"""
        self.requests[msgid].errback(error)
        del self.requests[msgid]
1360198
def _error(self, message, start, end=None):
        """"""
        raise errors.EfilterParseError(
            source=self.source, start=start, end=end, message=message)
1268896
def error(message, code=1):
    """"""
    if message:
        print('ERROR: {0}'.format(message), file=sys.stderr)
    else:
        print(file=sys.stderr)
    sys.exit(code)
728648
def success_redirect(self, msg='', log=''):
        '''
        
        '''
        from django.shortcuts import redirect
        self.lti_msg = msg
        self.lti_log = log
        return redirect(self.build_return_url())
319128
def error(request, message, extra_tags='', fail_silently=False, async=False):
    """"""
    if ASYNC and async:
        messages.debug(_get_user(request), message)
    else:
        add_message(request, constants.ERROR, message, extra_tags=extra_tags,
                    fail_silently=fail_silently)
586469
def error(self, message, *args, **kwargs):
        
        self.system.error(message, *args, **kwargs)
1254571
def handleError(self, error_code, message):
        ''''''
        self._fail = True
        self.reason = error_code
        self._error = message
983441
def raise_for_status(self):
        """"""

        if self.error:
            raise self.error

        if (self.status_code >= 300) and (self.status_code < 400):
            raise HTTPError('%s Redirection' % self.status_code)

        elif (self.status_code >= 400) and (self.status_code < 500):
            raise HTTPError('%s Client Error' % self.status_code)

        elif (self.status_code >= 500) and (self.status_code < 600):
            raise HTTPError('%s Server Error' % self.status_code)
827928
def raiseError(cls, message):
        
        error_message = "[error] %s" % message
        if cls.__raise_exception__:
            raise Exception(error_message)

        cls.colorprint(error_message, Fore.RED)
        sys.exit(1)
1236065
def describe_error(failure):
    """"""
    if failure.check(ResponseFailed):
        if any(f.check(InfiniteRedirection)
               for f in failure.value.reasons):
            return u'Encountered too many redirects.'
        return u'Received incomplete response from server.'
    if failure.check(ConnectError, DNSLookupError, BlacklistedHost):
        return u'Could not connect to server.'
    return failure
657079
def err(msg):
    """"""
    click.echo(click.style(msg, fg="red", bold=True))
571156
def error(self, message: str) -> None:
        """"""
        if len(self._custom_error_message) > 0:
            message = self._custom_error_message
            self._custom_error_message = ''

        lines = message.split('\n')
        linum = 0
        formatted_message = ''
        for line in lines:
            if linum == 0:
                formatted_message = 'Error: ' + line
            else:
                formatted_message += '\n       ' + line
            linum += 1

        sys.stderr.write(Fore.LIGHTRED_EX + '{}\n\n'.format(formatted_message) + Fore.RESET)
        # sys.stderr.write('{}\n\n'.format(formatted_message))
        self.print_help()
        sys.exit(1)
794732
def _server_error_message(url, message):
    """"""
    msg = _error_message.format(url=url, message=message)
    log.error(msg)
    return msg
868319
public void notifyError( URL resource, String message )
    {
        m_out.println( resource.toExternalForm() + " : " + message );
    }
37060
def error_msg_callback(self, callback):
        """"""
        if callable(callback):
            self._error_msg_callback = callback
        else:
            self._error_msg_callback = None
72460
function(err, model, response, options){
  if (options.cb){
    options.cb(err, model, response);
  }
  if (err){
    model.trigger('error', err, model, options);
  }
}