'error: Raise an error
Required argument: anything
Keyword argument number: an error number
Keyword argument partial_result: any partial result occurring before the error
Keyword argument from_: the object that caused the error
Keyword argument to: the desired class for a failed coercion
Keyword argument _attributes: AppleEvent attribute dictionary'

def error(self, _object=None, _attributes={}, **_arguments):

    _code = 'ascr'
    _subcode = 'err    '
    aetools.keysubst(_arguments, self._argmap_error)
    _arguments['----'] = _object
    (_reply, _arguments, _attributes) = self.send(_code, _subcode, _arguments, _attributes)
    if _arguments.get('errn', 0):
        raise aetools.Error, aetools.decodeerror(_arguments)
    if _arguments.has_key('----'):
        return _arguments['----']
