message : str
        type_ : str
        Returns -> Error
359872
async def SwitchBlockOff(self, message, type_):
        '''
        
        '''
        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Block',
                   request='SwitchBlockOff',
                   version=2,
                   params=_params)
        _params['message'] = message
        _params['type'] = type_
        reply = await self.rpc(msg)
        return reply
218147
def is_type_text_string(obj):
    """"""
    if PY2:
        # Python 2
        return type(obj) in [str, unicode]
    else:
        # Python 3
        return type(obj) in [str, bytes]
668184
def error(self, message, *args, **kwargs):
        
        self._log(logging.ERROR, message, *args, **kwargs)
241840
function parse_messages (parser_type, str) {
  var parser = new HTTPParser(parser_type);
  var buffer = new Buffer(str, 'utf-8');
  var output = [];

  parser.onMessageBegin = function() {
    output.push({
      versionMajor: undefined,
      versionMinor: undefined,
      method: undefined,
      uri: undefined,
      statusCode: undefined,
      headers: {},
      body: "",
      complete: false
    });
    parser.field = null;
    parser.value = null;
  };

  parser.onURL = function(b, start, len) {
    var slice = b.toString('ascii', start, start + len);
    if (output[output.length-1].url) {
      output[output.length-1].url += slice;
    } else {
      // Almost always will branch here.
      output[output.length-1].url = slice;
    }
  };
  
  parser.onHeaderField = function(b, start, len) {
    var slice = b.toString('ascii', start, start + len).toLowerCase();
    if (parser.value != undefined) {
      // note that this overwrites dup headers
      output[output.length-1].headers[parser.field] = parser.value;
      parser.field = null;
      parser.value = null;
    }
    if (parser.field) {
      parser.field += slice;
    } else {
      parser.field = slice;
    }
  };

  parser.onHeaderValue = function(b, start, len) {
    var slice = b.toString('ascii', start, start + len);
    if (parser.value) {
      parser.value += slice;
    } else {
      parser.value = slice;
    }
  };

  parser.onHeadersComplete = function(info) {
    if (parser.field && (parser.value != undefined)) {
      output[output.length-1].headers[parser.field] = parser.value;
      parser.field = null;
      parser.value = null;
    }

    output[output.length-1].versionMajor = info.versionMajor;
    output[output.length-1].versionMinor = info.versionMinor;
    output[output.length-1].statusCode = info.statusCode;
    output[output.length-1].method = info.method;

    return false // isHeadResponse;
  };

  parser.onBody = function(b, start, len) {
    var slice = b.slice(start, start + len);
    output[output.length-1].body += slice;
  };

  parser.onMessageComplete = function() {
    output[output.length-1].complete = true;
    if (parser.field && (parser.value != undefined)) {
      output[output.length-1].headers[parser.field] = parser.value;
    }  
  }
  
  parser.execute(buffer, 0, buffer.length);
  
  // filter out incomplete responses.
  var complete_output = [];
  output.forEach(function (o) {
    if (o.complete) {
      complete_output.push(o);
    }
  })
  return complete_output;
}
1333889
def pyError(self, type, value, traceback):
        '''
        '''
        sys.stderr.write("Exception thrown during EWrapper method dispatch:\n")
        print_exception(type, value, traceback)
433782
function getErrorMessage(oType) {
		return sap.ui.getCore().getLibraryResourceBundle().getText(
			isDateOnly(oType) ? "EnterDate" : "EnterDateTime",
				[oType.formatValue(isDateOnly(oType) ? oDemoDate : oDemoDateTime, "string")]);
	}
178517
def warn_import_error(type_of_obj_support: str, caught: ImportError):
    
    msg = StringIO()
    msg.writelines('Import Error while trying to add support for ' + type_of_obj_support + '. You may continue but '
                   'the associated parsers and converters wont be available : \n')
    traceback.print_tb(caught.__traceback__, file=msg)
    msg.writelines(str(caught.__class__.__name__) + ' : ' + str(caught) + '\n')
    warn(msg.getvalue())
354295
def err(msg, *args, **kw):
    # type: (str, *Any, **Any) -> None
    
    if len(args) or len(kw):
        msg = msg.format(*args, **kw)

    shell.cprint('-- <31>{}<0>'.format(msg))
1197942
def _win32_strerror(err):
    

    # FormatMessage will allocate memory and assign it here
    buf = ctypes.c_char_p()
    FormatMessage(
        FORMAT_MESSAGE_FROM_SYSTEM
        | FORMAT_MESSAGE_ALLOCATE_BUFFER
        | FORMAT_MESSAGE_IGNORE_INSERTS,
        None,
        err,
        0,
        buf,
        0,
        None,
    )
    try:
        return buf.value
    finally:
        LocalFree(buf)
854513
function Message(name, reqType, errType, resType, oneWay, doc) {
  this.name = name;
  if (!Type.isType(reqType, 'record')) {
    throw new Error('invalid request type');
  }
  this.requestType = reqType;
  if (
    !Type.isType(errType, 'union') ||
    !Type.isType(errType.getTypes()[0], 'string')
  ) {
    throw new Error('invalid error type');
  }
  this.errorType = errType;
  if (oneWay) {
    if (!Type.isType(resType, 'null') || errType.getTypes().length > 1) {
      throw new Error('inapplicable one-way parameter');
    }
  }
  this.responseType = resType;
  this.oneWay = !!oneWay;
  this.doc = doc !== undefined ? '' + doc : undefined;
  Object.freeze(this);
}
65068
def error(message)
      message = message.red unless message.color?
      puts(stderr, message)
    end
841063
def _error_message(self):
        
        body = self._deserialize()
        return body.get('message', body) if isinstance(body, dict) else body
1276494
def is_string_type(type_):
    

    string_types = _get_types(Types.STRING)
    if is_typing_type(type_):
        return type_ in string_types or is_regex_type(type_)
    return type_ in string_types
751818
function exception(type) {
	
	var message = errors[type];
	
	for(var i = 1; i < arguments.length; i++)
		message = message.replace('%', arguments[i].toString().replace(/\((.|\r\n|\n|\r)*/gm, ''));
	
	return "Exception: " + message;
}
20970
def fail(self, message, view, type_error=False):
        
        exc_class = ConfigTypeError if type_error else ConfigValueError
        raise exc_class(
            u'{0}: {1}'.format(view.name, message)
        )
745179
def message(self, message: types.Message):
        
        setattr(self, 'from_chat_id', message.chat.id)
        setattr(self, 'message_id', message.message_id)
        return self
147894
async def load_message(self, msg_type, msg=None):
        
        msg = msg_type() if msg is None else msg
        fields = msg_type.f_specs() if msg_type else msg.__class__.f_specs()
        for field in fields:
            await self.message_field(msg, field)

        return msg