Decodes the association reject message and extracts the error reasons given.
 Returns the processed information hash.

 === Parameters

 * <tt>message</tt> -- The binary message string.
357651
def interpret_association_reject(message)
      info = Hash.new
      msg = Stream.new(message, @net_endian)
      # Reserved (1 byte)
      msg.skip(1)
      # Result (1 byte)
      info[:result] = msg.decode(1, "BY") # 1 for permanent and 2 for transient rejection
      # Source (1 byte)
      info[:source] = msg.decode(1, "BY")
      # Reason (1 byte)
      info[:reason] = msg.decode(1, "BY")
      logger.warn("ASSOCIATE Request was rejected by the host. Error codes: Result: #{info[:result]}, Source: #{info[:source]}, Reason: #{info[:reason]} (See DICOM PS3.8: Table 9-21 for details.)")
      stop_receiving
      info[:valid] = true
      return info
    end
841063
def _error_message(self):
        
        body = self._deserialize()
        return body.get('message', body) if isinstance(body, dict) else body
558865
def process_message(message_text):
    
    message_text = normalize_message(message_text)
    for (regex, data_lambda) in TEMPLATES:
        match = regex.search(message_text)
        if match:
            result = Request(**data_lambda(match))
            return result
1025911
protected String classifyWarning(final String message) {
        if (StringUtils.contains(message, "proprietary")) {
            return PROPRIETARY_API;
        }
        if (StringUtils.contains(message, "deprecated")) {
            return DEPRECATION;
        }
        return StringUtils.EMPTY;
    }
45379
protected String getDetailedErrorMessage(String message) {
		StringBuilder sb = new StringBuilder(message).append("\n");
		sb.append("HandlerMethod details: \n");
		sb.append("Bean [").append(getBeanType().getName()).append("]\n");
		sb.append("Method [").append(getBridgedMethod().toGenericString()).append("]\n");
		return sb.toString();
	}
1218519
def reject_message(self, delivery_tag, requeue=False, **kwargs):
        
        logger.info('Rejecting message', delivery_tag=delivery_tag, **kwargs)
        self._channel.basic_reject(delivery_tag, requeue=requeue)
517748
def _message_to_payload(cls, message):
        ''''''
        try:
            return json.loads(message.decode())
        except UnicodeDecodeError:
            message = 'messages must be encoded in UTF-8'
        except json.JSONDecodeError:
            message = 'invalid JSON'
        raise cls._error(cls.PARSE_ERROR, message, True, None)
1270204
def message
      return {} unless params[:_message]
      begin
        Marshal.load(Merb::Parse.unescape(params[:_message]).unpack("m").first)
      rescue ArgumentError, TypeError
        {}
      end
    end
145787
def message(self, value):
        
        try:
            import ast
            value = ast.literal_eval(value)
        except (SyntaxError, TypeError, ValueError):
            pass
        try:
            value = value.get('value', value)
            msg_data = value.split('\n')
            self._message = msg_data[0]
        except AttributeError:
            self._message = value
            return
        try:
            self.request_id = msg_data[1].partition(':')[2]
            time_str = msg_data[2].partition(':')
            self.error_time = Deserializer.deserialize_iso(
                "".join(time_str[2:]))
        except (IndexError, DeserializationError):
            pass
878197
def parse_message(message, nodata=False):
    
    header = read_machine_header(message)
    h_len = __get_machine_header_length(header)
    meta_raw = message[h_len:h_len + header['meta_len']]
    meta = __parse_meta(meta_raw, header)
    data_start = h_len + header['meta_len']
    data = b''
    if not nodata:
        data = __decompress(
            meta,
            message[data_start:data_start + header['data_len']]
        )
    return header, meta, data
1323592
def decode_message(message)
      begin
        msg = MessagePack.unpack(message, symbolize_keys: true)
      rescue => ex
        raise InvalidMessageError, "couldn't unpack message: #{ex}"
      end
      begin
        klass = Utils.full_const_get msg[:type]
        o = klass.new(*msg[:args])
        o.id = msg[:id] if o.respond_to?(:id=) && msg[:id]
        o
      rescue => ex
        raise InvalidMessageError, "invalid message: #{ex}"
      end
    end
1032599
def get_error_message(response_content):
    
    apache_regex = re.compile('.*<u>(.*)</u></p><p>.*')
    match = apache_regex.search(response_content)
    if match:
        error_message = match.group(1)
    else:
        local_regex = re.compile('.*<title>(.*)</title>.*')
        match = local_regex.search(response_content)
        if match:
            error_message = match.group(1)
        else:
            error_message = response_content
    return error_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
957932
function(message) {
    if (debug) console.log('Decoding HEP3 Packet...');
    try {
	var HEP = hepHeader.parse(message);
	if(HEP.payload && HEP.payload.length>0){
	  var data = HEP.payload;
	  var tot = 0;
	  var decoded = {};
	  var PAYLOAD;
	  while(true){
	    PAYLOAD = hepParse.parse( data.slice(tot) );
	    var tmp = hepDecode(PAYLOAD);
	    decoded = mixinDeep(decoded, tmp);
	    tot += PAYLOAD.length;
	    if(tot>=HEP.payload.length) { break; }
	  }
	  if(debug) console.log(decoded);
	  return decoded;
	}
    } catch(e) {
	return false;
    }

  }
1349659
def extract_message_information(message)
      informations = Hash[message.scan(/^(.*)=(.*)$/).map { |(key, value)| [key.to_sym, value] }]
    end
805177
def convert_to_py_error(error_message):
    
    message = error_message.lower()
    for err_msg, err_type in ERR_MSGS:
        if err_msg in message:
            return err_type(error_message)
    else:
        return IndicoError(error_message)
773722
@Override
    public void messageReceived(NextFilter nextFilter, IoSession session,
            Object message) throws Exception {
        LOGGER.debug("Processing a MESSAGE_RECEIVED for session {}", session.getId());

        if (!(message instanceof IoBuffer)) {
            nextFilter.messageReceived(session, message);
            return;
        }

        IoBuffer in = (IoBuffer) message;
        ProtocolDecoder decoder = getDecoder(session);
        ProtocolDecoderOutput decoderOut = getDecoderOut(session, nextFilter);
        IoSessionEx sessionEx = (IoSessionEx)session;

        Thread ioThread = sessionEx.getIoThread();

        // Loop until we don't have anymore byte in the buffer,
        // or until the decoder throws an unrecoverable exception or
        // can't decoder a message, because there are not enough
        // data in the buffer
        // Note: break out to let old I/O thread unwind after deregistering
        while (in.hasRemaining()) {
            // If the session is realigned, let the new thread deal with the decoding
            if (sessionEx.getIoThread() != ioThread) {
                if (LOGGER.isTraceEnabled()) {
                    LOGGER.trace(format("Decoding for session=%s will be continued by new thread=%s old thread=%s",
                            session, sessionEx.getIoThread(), ioThread));
                }
                break;
            }
            int oldPos = in.position();
            try {
                synchronized (decoderOut) {
                    // Call the decoder with the read bytes
                    decoder.decode(session, in, decoderOut);

                    // Finish decoding if no exception was thrown.
                    decoderOut.flush(nextFilter, session);
                }
            } catch (Throwable t) {
                ProtocolDecoderException pde;
                if (t instanceof ProtocolDecoderException) {
                    pde = (ProtocolDecoderException) t;
                } else {
                    pde = new ProtocolDecoderException(t);
                }

                if (pde.getHexdump() == null) {
                    // Generate a message hex dump
                    int curPos = in.position();
                    in.position(oldPos);
                    pde.setHexdump(in.getHexDump());
                    in.position(curPos);
                }

                // Fire the exceptionCaught event.
                synchronized (decoderOut) {
                    decoderOut.flush(nextFilter, session);
                }
                nextFilter.exceptionCaught(session, pde);

                // Retry only if the type of the caught exception is
                // recoverable and the buffer position has changed.
                // We check buffer position additionally to prevent an
                // infinite loop.
                if (!(t instanceof RecoverableProtocolDecoderException) ||
                        (in.position() == oldPos)) {
                    break;
                }
            }
        }
    }