Extracts the error message.
323101
public String getErrorMessage(IOException e) {
    // Prefer to use message from GJRE.
    GoogleJsonResponseException gjre = getJsonResponseExceptionOrNull(e);

    if (gjre != null && gjre.getDetails() != null) {
      return gjre.getDetails().getMessage();
    }
    return e.getMessage();
  }
1162278
def _get_error(self, code, errors, indentation=0):
        
        # Init
        results = []
        lines = None
        if code is not None:
            lines = [line.strip() for line in code.split('\n')]

        for error in errors.split('\n'):
            # Strip; skip empy lines
            error = error.strip()
            if not error:
                continue
            # Separate line number from description (if we can)
            linenr, error = self._parse_error(error)
            if None in (linenr, lines):
                results.append('%s' % error)
            else:
                results.append('on line %i: %s' % (linenr, error))
                if linenr > 0 and linenr < len(lines):
                    results.append('  %s' % lines[linenr - 1])

        # Add indentation and return
        results = [' ' * indentation + r for r in results]
        return '\n'.join(results)
137810
private function extractErrors($error)
    {
        $messages = [];

        foreach ($error as $key => $errors)
        {
            // If error is a MessageBag, extract errors
            if ($errors instanceof MessageBag) return $this->extractErrors($errors->toArray());

            // If we have an array of errors preserve key
            if (is_array($errors))
            {
                $messages[$key] = $this->extractErrors($errors);
                continue;
            }

            // We must be down to a single error, just return it
            return $errors;
        }

        return $messages;
    }
167711
def onerror(self, message, source, lineno, colno):
        """"""
        return (message, source, lineno, colno)
146305
def get_error(self):
        """"""
        col_offset = -1
        if self.node is not None:
            try:
                col_offset = self.node.col_offset
            except AttributeError:
                pass
        try:
            exc_name = self.exc.__name__
        except AttributeError:
            exc_name = str(self.exc)
        if exc_name in (None, 'None'):
            exc_name = 'UnknownError'

        out = ["   %s" % self.expr]
        if col_offset > 0:
            out.append("    %s^^^" % ((col_offset)*' '))
        out.append(str(self.msg))
        return (exc_name, '\n'.join(out))
690158
def error_message(self):
        ""
        output = self.msg + ", code " + str(self.code)
        output += ". Request Time={}, Request ID={}".format(self.timestamp, self.req_id)
        if self.name != self.__class__.__name__:
            output = self.name + ": " + output
        return output
443088
def getFailureMessage(failure):
    
    str(failure.type)
    failure.getErrorMessage()
    if len(failure.frames) == 0:
        return "failure %(exc)s: %(msg)s" % locals()

    (func, filename, line, some, other) = failure.frames[-1]
    filename = scrubFilename(filename)
    return "failure %(exc)s at %(filename)s:%(line)s: %(func)s(): %(msg)s" \
        % locals()
585504
def error(self, message):
        """"""
        if self._debug:
            import pdb
            _, _, tb = sys.exc_info()
            if tb:
                pdb.post_mortem(tb)
            else:
                pdb.set_trace()
        self.print_usage(sys.stderr)
        self.exit(2, ('\nERROR: {}\n').format(message))
964978
def _extract_upnperror(self, err_xml):
        
        nsmap = {'s': list(err_xml.nsmap.values())[0]}
        fault_str = err_xml.findtext(
            's:Body/s:Fault/faultstring', namespaces=nsmap)
        try:
            err = err_xml.xpath(
                's:Body/s:Fault/detail/*[name()="%s"]' % fault_str, namespaces=nsmap)[0]
        except IndexError:
            msg = 'Tag with name of %r was not found in the error response.' % fault_str
            self._log.debug(
                msg + '\n' + etree.tostring(err_xml, pretty_print=True).decode('utf8'))
            raise SOAPProtocolError(msg)

        err_code = err.findtext('errorCode', namespaces=err.nsmap)
        err_desc = err.findtext('errorDescription', namespaces=err.nsmap)

        if err_code is None or err_desc is None:
            msg = 'Tags errorCode or errorDescription were not found in the error response.'
            self._log.debug(
                msg + '\n' + etree.tostring(err_xml, pretty_print=True).decode('utf8'))
            raise SOAPProtocolError(msg)
        return int(err_code), err_desc
1014323
public String getErrorMessage ()
    {
        String msg = getMessage();
        return String.valueOf(_errorCode).equals(msg) ? null : msg;
    }
550411
def parse_error(output_dir):
    
    sys.stderr.seek(0)
    std_err = sys.stderr.read().decode('utf-8')
    err_file = os.path.join(output_dir, "eplusout.err")
    if os.path.isfile(err_file):
        with open(err_file, "r") as f:
            ep_err = f.read()
    else:
        ep_err = "<File not found>"
    message = "\r\n{std_err}\r\nContents of EnergyPlus error file at {err_file}\r\n{ep_err}".format(**locals())
    return message
955876
def error(self):
        """"""
        try:
            errcode = DeviceErrorCode(self.error_code)
            return "%s (%s): %s" % (errcode.name, errcode.value, self.error_message)
        except:
            return "Error %s: %s" % (self.error_code, self.error_message)
1325445
function getErrorMessage (err, status, env) {
  var msg

  if (env !== 'production') {
    // use err.stack, which typically includes err.message
    msg = err.stack

    // fallback to err.toString() when possible
    if (!msg && typeof err.toString === 'function') {
      msg = err.toString()
    }
  }

  return msg || statuses[status]
}
953232
def go_to_error(self, text):
        """"""
        match = get_error_match(to_text_string(text))
        if match:
            fname, lnb = match.groups()
            self.edit_script(fname, int(lnb))
755138
def fromMessage(cls, message):
        """"""
        error_text = message.getArg(
            OPENID_NS, 'error', '<no error message supplied>')
        error_code = message.getArg(OPENID_NS, 'error_code')
        return cls(error_text, error_code, message)
673203
def _get_err_msg(row, col, fld, val, prt_flds):
        """"""
        import traceback
        traceback.print_exc()
        err_msg = (
            "ROW({R}) COL({C}) FIELD({F}) VAL({V})\n".format(R=row, C=col, F=fld, V=val),
            "PRINT FIELDS({N}): {F}".format(N=len(prt_flds), F=" ".join(prt_flds)))
        return "\n".join(err_msg)
841063
def _error_message(self):
        
        body = self._deserialize()
        return body.get('message', body) if isinstance(body, dict) else body