<s> from pyws . utils import DefaultStrImplemntationMixin <EOL> ET_CLIENT = <NUM_LIT:1> <EOL> ET_SERVER = <NUM_LIT:2> <EOL> class Error ( DefaultStrImplemntationMixin , Exception ) : <EOL> error_type = ET_SERVER <EOL> def __unicode__ ( self ) : <EOL> if self . __doc__ : <EOL> return unicode ( self . __doc__ . strip ( ) % self . args ) <EOL> if self . args : <EOL> return self . args [ <NUM_LIT:0> ] <EOL> return '<STR_LIT>' <EOL> class ClientErrorTypeMixin ( Exception ) : <EOL> error_type = ET_CLIENT <EOL> class ConfigurationError ( Error ) : <EOL> def __unicode__ ( self ) : <EOL> return unicode ( self . args [ <NUM_LIT:0> ] ) <EOL> class ServerAlreadyRegistered ( ConfigurationError ) : <EOL> """<STR_LIT>""" <EOL> class DefaultServerAlreadyRegistered ( ConfigurationError ) : <EOL> """<STR_LIT>""" <EOL> class SettingNotDefined ( ConfigurationError ) : <EOL> """<STR_LIT>""" <EOL> class NoProtocolsRegistered ( ConfigurationError ) : <EOL> """<STR_LIT>""" <EOL> class BadProtocol ( ConfigurationError ) : <EOL> """<STR_LIT>""" <EOL> class FunctionAlreadyRegistered ( ConfigurationError ) : <EOL> """<STR_LIT>""" <EOL> class BadFunction ( ConfigurationError ) : <EOL> """<STR_LIT>""" <EOL> class ProtocolError ( Error ) : <EOL> pass <EOL> class ProtocolNotFound ( ClientErrorTypeMixin , ProtocolError ) : <EOL> """<STR_LIT>""" <EOL> class BadRequest ( ClientErrorTypeMixin , ProtocolError ) : <EOL> def __unicode__ ( self ) : <EOL> if not self . args : <EOL> return u'<STR_LIT>' <EOL> return u'<STR_LIT>' % self . args [ <NUM_LIT:0> ] <EOL> class AccessDenied ( ClientErrorTypeMixin , ProtocolError ) : <EOL> def __unicode__ ( self ) : <EOL> if not self . args or not self . args [ <NUM_LIT:0> ] : <EOL> return u'<STR_LIT>' <EOL> return u'<STR_LIT>' % self . args [ <NUM_LIT:0> ] <EOL> class FunctionError ( Error ) : <EOL> pass <EOL> class FunctionNotFound ( ClientErrorTypeMixin , FunctionError ) : <EOL> """<STR_LIT>""" <EOL> class FieldError ( ClientErrorTypeMixin , Error ) : <EOL> pass <EOL> class MissingFieldValue ( FieldError ) : <EOL> """<STR_LIT>""" <EOL> class WrongFieldValueType ( FieldError ) : <EOL> """<STR_LIT>""" </s>
