Intakes a dict of remote error information and raises a DashiError
326210
def raise_error(error):
    
    exc_type = error.get('exc_type')
    if exc_type and exc_type.startswith(ERROR_PREFIX):
        exc_type = exc_type[len(ERROR_PREFIX):]
        exc_cls = ERROR_TYPE_MAP.get(exc_type, DashiError)
    else:
        exc_cls = DashiError

    raise exc_cls(**error)
1337128
def __check_http_err(self, status_code):
        """"""
        if status_code == 403:
            raise exceptions.APIAuthenticationError(self.api_key)
        elif status_code == 503:
            raise exceptions.APITimeoutError()
        else:
            return False
16106
def on_error(e):  # pragma: no cover
    
    exname = {'RuntimeError': 'Runtime error', 'Value Error': 'Value error'}
    sys.stderr.write('{}: {}\n'.format(exname[e.__class__.__name__], str(e)))
    sys.stderr.write('See file slam_error.log for additional details.\n')
    sys.exit(1)
256543
function (err, data) {
		if (err) {
			LOG.warn(err.toString());
		}
		else {
			for (var server in data.accounts) {
				LOG.warn('local server: ' + server);

				var user_list = data.accounts[server];
				for (var uid in user_list) {
					var token = user_list[uid];
					LOG.warn('local uid: ' + uid + ' token: ' + token);
					l_send_remote_login(server, uid, token);	
				}
			}
		}
	}
552366
def popError(text, title="Lackey Error"):
    
    root = tk.Tk()
    root.withdraw()
    tkMessageBox.showerror(title, text)
698103
def _error_repr(error):
    """"""
    error_repr = repr(error)
    if len(error_repr) > 200:
        error_repr = hash(type(error))
    return error_repr
233278
def raise_if_error(frame):
    
    if "status" not in frame or frame["status"] == b"\x00":
        return
    codes_and_exceptions = {
        b"\x01": exceptions.ZigBeeUnknownError,
        b"\x02": exceptions.ZigBeeInvalidCommand,
        b"\x03": exceptions.ZigBeeInvalidParameter,
        b"\x04": exceptions.ZigBeeTxFailure
    }
    if frame["status"] in codes_and_exceptions:
        raise codes_and_exceptions[frame["status"]]()
    raise exceptions.ZigBeeUnknownStatus()
738033
def _raise_error_if_not_sframe(dataset, variable_name="SFrame"):
    
    err_msg = "Input %s is not an SFrame. If it is a Pandas DataFrame,"
    err_msg += " you may use the to_sframe() function to convert it to an SFrame."

    if not isinstance(dataset, _SFrame):
      raise ToolkitError(err_msg % variable_name)
516891
def handle_bad_update(operation, ret):
    ''''''
    print("Error " + operation)
    sys.exit('Return code: ' + str(ret.status_code) + ' Error: ' + ret.text)
916184
private static function catchError()
    {
        switch (json_last_error()) {
            case JSON_ERROR_NONE:
                self::$error = false;
                break;
            case JSON_ERROR_DEPTH:
                self::$error = 'Maximum stack depth exceeded';
                break;
            case JSON_ERROR_STATE_MISMATCH:
                self::$error = 'Underflow or the modes mismatch';
                break;
            case JSON_ERROR_CTRL_CHAR:
                self::$error = 'Unexpected control character found';
                break;
            case JSON_ERROR_SYNTAX:
                self::$error = 'Syntax error, malformed JSON';
                break;
            case JSON_ERROR_UTF8:
                self::$error = 'Malformed UTF-8 characters, possibly incorrectly encoded';
                break;
            default:
                self::$error = 'Unknown error';
                break;
        }
    }
679917
def _raise_bulk_write_error(full_result):
    
    if full_result["writeErrors"]:
        full_result["writeErrors"].sort(
            key=lambda error: error["index"])
    raise BulkWriteError(full_result)
1292050
def _extract_remote_exception(self, pantsd_pid, nailgun_error):
    
    sources = [pantsd_pid]
    if nailgun_error.pid is not None:
      sources = [abs(nailgun_error.pid)] + sources

    exception_text = None
    for source in sources:
      log_path = ExceptionSink.exceptions_log_path(for_pid=source)
      exception_text = maybe_read_file(log_path)
      if exception_text:
        break

    exception_suffix = '\nRemote exception:\n{}'.format(exception_text) if exception_text else ''
    return self.Terminated('abruptly lost active connection to pantsd runner: {!r}{}'.format(
      nailgun_error, exception_suffix))
1268163
def strerror(errno):
    """"""
    from pypy.module._codecs.locale import str_decode_locale_surrogateescape
    return str_decode_locale_surrogateescape(os.strerror(errno))
1113404
def raise_os_error(_errno, path=None):
    

    msg = "%s: '%s'" % (strerror(_errno), path) if path else strerror(_errno)
    raise OSError(_errno, msg)
144313
def err(r):
    

    import sys

    rc=r['return']
    re=r['error']

    out('Error: '+re)
    sys.exit(rc)
151618
def echo_error(root_resource, message):
  """"""
  params = dict(message=message)
  return root_resource.get(ECHO_ERROR_PATH, params)
230445
def raise_error(name=None, args=None, message=''):
    '''
    
    '''
    name = name or 'Exception'
    if hasattr(salt.exceptions, name):
        ex = getattr(salt.exceptions, name)
    elif hasattr(exceptions, name):
        ex = getattr(exceptions, name)
    else:
        name = 'SaltException'
        ex = getattr(salt.exceptions, name)
    if args is not None:
        raise ex(*args)
    else:
        raise ex(message)