<s> class KyotoTycoonError : <EOL> SUCCESS = <NUM_LIT:0> <EOL> NOIMPL = <NUM_LIT:1> <EOL> INVALID = <NUM_LIT:2> <EOL> LOGIC = <NUM_LIT:3> <EOL> INTERNAL = <NUM_LIT:4> <EOL> NETWORK = <NUM_LIT:5> <EOL> NOTFOUND = <NUM_LIT:6> <EOL> EMISC = <NUM_LIT:255> <EOL> ErrorNameDict = { <EOL> SUCCESS : "<STR_LIT>" , <EOL> NOIMPL : "<STR_LIT>" , <EOL> INVALID : "<STR_LIT>" , <EOL> LOGIC : "<STR_LIT>" , <EOL> INTERNAL : "<STR_LIT>" , <EOL> NETWORK : "<STR_LIT>" , <EOL> NOTFOUND : "<STR_LIT>" , <EOL> EMISC : "<STR_LIT>" , <EOL> } <EOL> ErrorMessageDict = { <EOL> SUCCESS : "<STR_LIT>" , <EOL> NOIMPL : "<STR_LIT>" , <EOL> INVALID : "<STR_LIT>" , <EOL> LOGIC : "<STR_LIT>" , <EOL> INTERNAL : "<STR_LIT>" , <EOL> NETWORK : "<STR_LIT>" , <EOL> NOTFOUND : "<STR_LIT>" , <EOL> EMISC : "<STR_LIT>" , <EOL> } <EOL> def __init__ ( self ) : <EOL> self . set_success ( ) <EOL> def set_success ( self ) : <EOL> self . error_code = self . SUCCESS <EOL> self . error_name = self . ErrorNameDict [ self . SUCCESS ] <EOL> self . error_message = self . ErrorMessageDict [ self . SUCCESS ] <EOL> def set_error ( self , code ) : <EOL> self . error_code = code <EOL> self . error_name = self . ErrorNameDict [ code ] <EOL> self . error_message = self . ErrorMessageDict [ code ] <EOL> def code ( self ) : <EOL> return self . error_code <EOL> def name ( self ) : <EOL> return self . error_name <EOL> def message ( self ) : <EOL> return self . error_message </s>
