Parse the message as a fault.
966423
def FaultFromFaultMessage(ps):
    '''
    '''
    pyobj = ps.Parse(FaultType.typecode)

    if pyobj.detail == None:  detailany = None
    else:  detailany = pyobj.detail.any

    return Fault(pyobj.faultcode, pyobj.faultstring,
                pyobj.faultactor, detailany)
212095
def from_errno(cls, errno):
        """"""
        message = '{}: {}'.format(pyuv.errno.errorcode.get(errno, errno),
                                    pyuv.errno.strerror(errno))
        return cls(message, errno)
309652
def error(self, message):
        
        if (
            "not allowed" in message
            or "ignored" in message
            or "expected" in message
            or "invalid" in message
            or self.add_help
        ):
            # when we have "help" then we must also have proper error
            # processing.  Without "help", we suppress the errors by
            # doing nothing here
            super(IntermediateConfigmanParser, self).error(message)
1265991
def from_raw_message(cls, rawmessage):
        """"""
        return StandardReceive(rawmessage[2:5],
                               rawmessage[5:8],
                               {'cmd1': rawmessage[9],
                                'cmd2': rawmessage[10]},
                               flags=rawmessage[8])
167711
def onerror(self, message, source, lineno, colno):
        """"""
        return (message, source, lineno, colno)
955316
def parse(self, text, encoding='utf8', raise_exception=False):
        """"""

        return self.helper.string.serialization.json.parse(
            text=text,
            encoding=encoding,
            raise_exception=raise_exception)
692766
def parse(self, text):
        """"""
        if isinstance(text, bytes):
            text = text.decode("ascii")
        text = re.sub("\s+", " ", unidecode(text))
        return self.communicate(text + "\n")
614179
def _fail(self, message, text, i):
        """"""

        raise ValueError("{}:\n{}".format(message, text[i : i + 79]))
838489
def make_parse_err(self, err, reformat=True, include_ln=True):
        """"""
        err_line = err.line
        err_index = err.col - 1
        err_lineno = err.lineno if include_ln else None
        if reformat:
            err_line, err_index = self.reformat(err_line, err_index)
            if err_lineno is not None:
                err_lineno = self.adjust(err_lineno)
        return CoconutParseError(None, err_line, err_index, err_lineno)
1294325
def split_message(message, max_length):
    """"""
    if len(message) > max_length:
        for message in textwrap.wrap(message, max_length):
            yield message
    else:
        yield message.rstrip(STRIPPED_CHARS)
497927
def ParseLines(self, lines, message):
    """"""
    self._allow_multiple_scalars = False
    self._ParseOrMerge(lines, message)
    return message
1097680
public void handleMessage(T message) throws Fault {
        String flowId = FlowIdHelper.getFlowId(message);

        if (flowId == null) {
            flowId = FlowIdProtocolHeaderCodec.readFlowId(message);
        }

        if (flowId == null) {
            flowId = FlowIdSoapCodec.readFlowId(message);
        }

        if (flowId == null) {
             Exchange ex = message.getExchange();
        if (null!=ex){
        Message reqMsg = ex.getOutMessage();
             if ( null != reqMsg) {
                 flowId = FlowIdHelper.getFlowId(reqMsg);
                 if ( null != flowId) {
                 LOG.fine("Using FlowId '" + flowId + "' from exchange."); 
                 }
             }
        }
        }

        if (flowId != null) {
            LOG.fine("FlowId '" + flowId + "' found in incoming message.");
        } else {
            flowId = ContextUtils.generateUUID();
            LOG.fine("No flowId found in incoming message! Generate new flowId " + flowId);
        }

        FlowIdHelper.setFlowId(message, flowId);
    }
1052795
def _get_error_message(response):
    """"""
    try:
        data = response.json()
        if "error_description" in data:
            return data['error_description']
        if "error" in data:
            return data['error']
    except Exception:
        pass

    return "Unknown error"
1359581
def parse_error(self, response):
        ""
        error_code = response.split(' ')[0]
        if error_code in self.EXCEPTION_CLASSES:
            response = response[len(error_code) + 1:]
            return self.EXCEPTION_CLASSES[error_code](response)
        return ResponseError(response)
712482
def parse(self, msg):
        
        #init
        dictValues = HL7Dict(self.tersersep)
        msg_ = msg.strip('\r\n ')

        # extracts separator defined in the message itself
        self.extractSeparators(dictValues, msg_)
        msg_ = msg_.replace('\r', '\n')
        lines = msg_.split('\n')
        lineNumber = 1

        # build the map of segments
        segmentNameCount, lineMap = self.buildSegmentMap(lines)
        dictValues.setSegmentsMap(segmentNameCount, lineMap)

        # Parse each line of the message : 1 line = 1 segment
        for line in lines:
            dictValues.currentLineNumber = lineNumber
            self.extractValues(dictValues, line)
            lineNumber += 1

        return dictValues
1013058
def _parse_ftp_error(error):
    # type: (ftplib.Error) -> Tuple[Text, Text]
    """"""
    code, _, message = text_type(error).partition(" ")
    return code, message
326422
def extract_error_message(cls, e):
        """"""
        message = str(e)
        try:
            if isinstance(e.args, tuple) and len(e.args) > 1:
                message = e.args[1]
        except Exception:
            pass
        return message