public static const MISSING_RESULT:int = 5;
public static const INTERNAL_ERROR:int = 6;
public static const PROTOCOL_ERROR:int = 7;
+ public static const INVALID_TRANSFORM:int = 8;
+ public static const INVALID_PROTOCOL:int = 9;
+ public static const UNSUPPORTED_CLIENT_TYPE:int = 10;
public function TApplicationError(type:int = UNKNOWN, message:String = "") {
super(message, type);
}
-
+
public static function read(iprot:TProtocol):TApplicationError {
var field:TField;
iprot.readStructBegin();
THRIFT_APPLICATION_EXCEPTION_ERROR_BAD_SEQUENCE_ID,
THRIFT_APPLICATION_EXCEPTION_ERROR_MISSING_RESULT,
THRIFT_APPLICATION_EXCEPTION_ERROR_INTERNAL_ERROR,
- THRIFT_APPLICATION_EXCEPTION_ERROR_PROTOCOL_ERROR
+ THRIFT_APPLICATION_EXCEPTION_ERROR_PROTOCOL_ERROR,
+ THRIFT_APPLICATION_EXCEPTION_ERROR_INVALID_TRANSFORM,
+ THRIFT_APPLICATION_EXCEPTION_ERROR_INVALID_PROTOCOL,
+ THRIFT_APPLICATION_EXCEPTION_ERROR_UNSUPPORTED_CLIENT_TYPE
} ThriftApplicationExceptionError;
/* define error domain for GError */
TApplicationException_BAD_SEQUENCE_ID = 4,
TApplicationException_MISSING_RESULT = 5,
TApplicationException_INTERNAL_ERROR = 6,
- TApplicationException_PROTOCOL_ERROR = 7
+ TApplicationException_PROTOCOL_ERROR = 7,
+ TApplicationException_INVALID_TRANSFORM = 8,
+ TApplicationException_INVALID_PROTOCOL = 9,
+ TApplicationException_UNSUPPORTED_CLIENT_TYPE = 10
};
// FIXME
case TApplicationException_MISSING_RESULT:
name = @"Missing result";
break;
+ case TApplicationException_INTERNAL_ERROR:
+ name = @"Internal error";
+ break;
+ case TApplicationException_PROTOCOL_ERROR:
+ name = @"Protocol error";
+ break;
+ case TApplicationException_INVALID_TRANSFORM:
+ name = @"Invalid transform";
+ break;
+ case TApplicationException_INVALID_PROTOCOL:
+ name = @"Invalid protocol";
+ break;
+ case TApplicationException_UNSUPPORTED_CLIENT_TYPE:
+ name = @"Unsupported client type";
+ break;
default:
name = @"Unknown";
break;
BAD_SEQUENCE_ID = 4,
MISSING_RESULT = 5,
INTERNAL_ERROR = 6,
- PROTOCOL_ERROR = 7
+ PROTOCOL_ERROR = 7,
+ INVALID_TRANSFORM = 8,
+ INVALID_PROTOCOL = 9,
+ UNSUPPORTED_CLIENT_TYPE = 10
};
TApplicationException() :
virtual const char* what() const throw() {
if (message_.empty()) {
switch (type_) {
- case UNKNOWN : return "TApplicationException: Unknown application exception";
- case UNKNOWN_METHOD : return "TApplicationException: Unknown method";
- case INVALID_MESSAGE_TYPE : return "TApplicationException: Invalid message type";
- case WRONG_METHOD_NAME : return "TApplicationException: Wrong method name";
- case BAD_SEQUENCE_ID : return "TApplicationException: Bad sequence identifier";
- case MISSING_RESULT : return "TApplicationException: Missing result";
- default : return "TApplicationException: (Invalid exception type)";
+ case UNKNOWN : return "TApplicationException: Unknown application exception";
+ case UNKNOWN_METHOD : return "TApplicationException: Unknown method";
+ case INVALID_MESSAGE_TYPE : return "TApplicationException: Invalid message type";
+ case WRONG_METHOD_NAME : return "TApplicationException: Wrong method name";
+ case BAD_SEQUENCE_ID : return "TApplicationException: Bad sequence identifier";
+ case MISSING_RESULT : return "TApplicationException: Missing result";
+ case INTERNAL_ERROR : return "TApplicationException: Internal error";
+ case PROTOCOL_ERROR : return "TApplicationException: Protocol error";
+ case INVALID_TRANSFORM : return "TApplicationException: Invalid transform";
+ case INVALID_PROTOCOL : return "TApplicationException: Invalid protocol";
+ case UNSUPPORTED_CLIENT_TYPE : return "TApplicationException: Unsupported client type";
+ default : return "TApplicationException: (Invalid exception type)";
};
} else {
return message_.c_str();
InvalidMessageType,
WrongMethodName,
BadSequenceID,
- MissingResult
+ MissingResult,
+ InternalError,
+ ProtocolError,
+ InvalidTransform,
+ InvalidProtocol,
+ UnsupportedClientType
}
}
}
BAD_SEQUENCE_ID = 4, ///
MISSING_RESULT = 5, ///
INTERNAL_ERROR = 6, ///
- PROTOCOL_ERROR = 7 ///
+ PROTOCOL_ERROR = 7, ///
+ INVALID_TRANSFORM = 8, ///
+ INVALID_PROTOCOL = 9, ///
+ UNSUPPORTED_CLIENT_TYPE = 10 ///
}
///
case Type.WRONG_METHOD_NAME: return "Wrong method name";
case Type.BAD_SEQUENCE_ID: return "Bad sequence identifier";
case Type.MISSING_RESULT: return "Missing result";
+ case Type.INTERNAL_ERROR: return "Internal error";
+ case Type.PROTOCOL_ERROR: return "Protocol error";
+ case Type.INVALID_TRANSFORM: return "Invalid transform";
+ case Type.INVALID_PROTOCOL: return "Invalid protocol";
+ case Type.UNSUPPORTED_CLIENT_TYPE: return "Unsupported client type";
default: return "(Invalid exception type)";
}
}
InvalidMessageType,
WrongMethodName,
BadSequenceID,
- MissingResult
+ MissingResult,
+ InternalError,
+ ProtocolError,
+ InvalidTransform,
+ InvalidProtocol,
+ UnsupportedClientType
);
{$SCOPEDENUMS OFF}
private
-define(TApplicationException_MISSING_RESULT, 5).
-define(TApplicationException_INTERNAL_ERROR, 6).
-define(TApplicationException_PROTOCOL_ERROR, 7).
-
+-define(TApplicationException_INVALID_TRANSFORM, 8).
+-define(TApplicationException_INVALID_PROTOCOL, 9).
+-define(TApplicationException_UNSUPPORTED_CLIENT_TYPE, 10).
MISSING_RESULT = 5
INTERNAL_ERROR = 6
PROTOCOL_ERROR = 7
+ INVALID_TRANSFORM = 8
+ INVALID_PROTOCOL = 9
+ UNSUPPORTED_CLIENT_TYPE = 10
)
| AE_MISSING_RESULT
| AE_INTERNAL_ERROR
| AE_PROTOCOL_ERROR
+ | AE_INVALID_TRANSFORM
+ | AE_INVALID_PROTOCOL
+ | AE_UNSUPPORTED_CLIENT_TYPE
deriving ( Eq, Show, Typeable )
instance Enum AppExnType where
toEnum 5 = AE_MISSING_RESULT
toEnum 6 = AE_INTERNAL_ERROR
toEnum 7 = AE_PROTOCOL_ERROR
+ toEnum 8 = AE_INVALID_TRANSFORM
+ toEnum 9 = AE_INVALID_PROTOCOL
+ toEnum 10 = AE_UNSUPPORTED_CLIENT_TYPE
toEnum t = error $ "Invalid AppExnType " ++ show t
fromEnum AE_UNKNOWN = 0
fromEnum AE_MISSING_RESULT = 5
fromEnum AE_INTERNAL_ERROR = 6
fromEnum AE_PROTOCOL_ERROR = 7
+ fromEnum AE_INVALID_TRANSFORM = 8
+ fromEnum AE_INVALID_PROTOCOL = 9
+ fromEnum AE_UNSUPPORTED_CLIENT_TYPE = 10
data AppExn = AppExn { ae_type :: AppExnType, ae_message :: String }
deriving ( Show, Typeable )
public static final int MISSING_RESULT = 5;
public static final int INTERNAL_ERROR = 6;
public static final int PROTOCOL_ERROR = 7;
+ public static final int INVALID_TRANSFORM = 8;
+ public static final int INVALID_PROTOCOL = 9;
+ public static final int UNSUPPORTED_CLIENT_TYPE = 10;
protected int type_ = UNKNOWN;
public static final int MISSING_RESULT = 5;
public static final int INTERNAL_ERROR = 6;
public static final int PROTOCOL_ERROR = 7;
-
+ public static final int INVALID_TRANSFORM = 8;
+ public static final int INVALID_PROTOCOL = 9;
+ public static final int UNSUPPORTED_CLIENT_TYPE = 10;
protected int type_ = UNKNOWN;
'BAD_SEQUENCE_ID' : 4,
'MISSING_RESULT' : 5,
'INTERNAL_ERROR' : 6,
- 'PROTOCOL_ERROR' : 7
+ 'PROTOCOL_ERROR' : 7,
+ 'INVALID_TRANSFORM' : 8,
+ 'INVALID_PROTOCOL' : 9,
+ 'UNSUPPORTED_CLIENT_TYPE' : 10
};
Thrift.TApplicationException = function(message, code) {
BAD_SEQUENCE_ID: 4,
MISSING_RESULT: 5,
INTERNAL_ERROR: 6,
- PROTOCOL_ERROR: 7
+ PROTOCOL_ERROR: 7,
+ INVALID_TRANSFORM: 8,
+ INVALID_PROTOCOL: 9,
+ UNSUPPORTED_CLIENT_TYPE: 10
}
var TApplicationException = exports.TApplicationException = function(type, message) {
| MISSING_RESULT
| INTERNAL_ERROR
| PROTOCOL_ERROR
+ | INVALID_TRANSFORM
+ | INVALID_PROTOCOL
+ | UNSUPPORTED_CLIENT_TYPE
let typ_of_i = function
0l -> UNKNOWN
| 5l -> MISSING_RESULT
| 6l -> INTERNAL_ERROR
| 7l -> PROTOCOL_ERROR
+ | 8l -> INVALID_TRANSFORM
+ | 9l -> INVALID_PROTOCOL
+ | 10l -> UNSUPPORTED_CLIENT_TYPE
| _ -> raise Thrift_error;;
let typ_to_i = function
| UNKNOWN -> 0l
| MISSING_RESULT -> 5l
| INTERNAL_ERROR -> 6l
| PROTOCOL_ERROR -> 7l
+ | INVALID_TRANSFORM -> 8l
+ | INVALID_PROTOCOL -> 9l
+ | UNSUPPORTED_CLIENT_TYPE -> 10l
class t =
object (self)
package TApplicationException;
use base('Thrift::TException');
-use constant UNKNOWN => 0;
-use constant UNKNOWN_METHOD => 1;
-use constant INVALID_MESSAGE_TYPE => 2;
-use constant WRONG_METHOD_NAME => 3;
-use constant BAD_SEQUENCE_ID => 4;
-use constant MISSING_RESULT => 5;
-use constant INTERNAL_ERROR => 6;
-use constant PROTOCOL_ERROR => 7;
+use constant UNKNOWN => 0;
+use constant UNKNOWN_METHOD => 1;
+use constant INVALID_MESSAGE_TYPE => 2;
+use constant WRONG_METHOD_NAME => 3;
+use constant BAD_SEQUENCE_ID => 4;
+use constant MISSING_RESULT => 5;
+use constant INTERNAL_ERROR => 6;
+use constant PROTOCOL_ERROR => 7;
+use constant INVALID_TRANSFORM => 8;
+use constant INVALID_PROTOCOL => 9;
+use constant UNSUPPORTED_CLIENT_TYPE => 10;
sub new {
my $classname = shift;
const MISSING_RESULT = 5;
const INTERNAL_ERROR = 6;
const PROTOCOL_ERROR = 7;
+ const INVALID_TRANSFORM = 8;
+ const INVALID_PROTOCOL = 9;
+ const UNSUPPORTED_CLIENT_TYPE = 10;
function __construct($message=null, $code=0) {
parent::__construct($message, $code);
MISSING_RESULT = 5
INTERNAL_ERROR = 6
PROTOCOL_ERROR = 7
+ INVALID_TRANSFORM = 8
+ INVALID_PROTOCOL = 9
+ UNSUPPORTED_CLIENT_TYPE = 10
def __init__(self, type=UNKNOWN, message=None):
TException.__init__(self, message)
return 'Bad sequence ID'
elif self.type == self.MISSING_RESULT:
return 'Missing result'
+ elif self.type == self.INTERNAL_ERROR:
+ return 'Internal error'
+ elif self.type == self.PROTOCOL_ERROR:
+ return 'Protocol error'
+ elif self.type == self.INVALID_TRANSFORM:
+ return 'Invalid transform'
+ elif self.type == self.INVALID_PROTOCOL:
+ return 'Invalid protocol'
+ elif self.type == self.UNSUPPORTED_CLIENT_TYPE:
+ return 'Unsupported client type'
else:
return 'Default (unknown) TApplicationException'
MISSING_RESULT = 5
INTERNAL_ERROR = 6
PROTOCOL_ERROR = 7
+ INVALID_TRANSFORM = 8
+ INVALID_PROTOCOL = 9
+ UNSUPPORTED_CLIENT_TYPE = 10
attr_reader :type