public static const SIZE_LIMIT:int = 3;
public static const BAD_VERSION:int = 4;
public static const NOT_IMPLEMENTED:int = 5;
+ public static const DEPTH_LIMIT:int = 6;
public function TProtocolError(error:int = UNKNOWN, message:String = "") {
super(message, error);
THRIFT_PROTOCOL_ERROR_NEGATIVE_SIZE,
THRIFT_PROTOCOL_ERROR_SIZE_LIMIT,
THRIFT_PROTOCOL_ERROR_BAD_VERSION,
- THRIFT_PROTOCOL_ERROR_NOT_IMPLEMENTED
+ THRIFT_PROTOCOL_ERROR_NOT_IMPLEMENTED,
+ THRIFT_PROTOCOL_ERROR_DEPTH_LIMIT
} ThriftProtocolError;
/* define an error domain for GError to use */
public const int NEGATIVE_SIZE = 2;
public const int SIZE_LIMIT = 3;
public const int BAD_VERSION = 4;
- public const int NOT_IMPLEMENTED= 5;
+ public const int NOT_IMPLEMENTED = 5;
+ public const int DEPTH_LIMIT = 6;
protected int type_ = UNKNOWN;
NEGATIVE_SIZE, ///
SIZE_LIMIT, ///
BAD_VERSION, ///
- NOT_IMPLEMENTED ///
+ NOT_IMPLEMENTED, ///
+ DEPTH_LIMIT ///
}
///
case Type.SIZE_LIMIT: return "Exceeded size limit";
case Type.BAD_VERSION: return "Invalid version";
case Type.NOT_IMPLEMENTED: return "Not implemented";
+ case Type.DEPTH_LIMIT: return "Exceeded size limit";
default: return "(Invalid exception type)";
}
}
\r
TProtocolException = class( Exception )\r
public\r
- const\r
+ const // TODO(jensg): change into enum\r
UNKNOWN : Integer = 0;\r
INVALID_DATA : Integer = 1;\r
NEGATIVE_SIZE : Integer = 2;\r
SIZE_LIMIT : Integer = 3;\r
BAD_VERSION : Integer = 4;\r
NOT_IMPLEMENTED : Integer = 5;\r
+ DEPTH_LIMIT : Integer = 6;\r
protected\r
FType : Integer;\r
public\r
SIZE_LIMIT = 3
BAD_VERSION = 4
NOT_IMPLEMENTED = 5
+ DEPTH_LIMIT = 6
)
type tProtocolException struct {
| PE_NEGATIVE_SIZE
| PE_SIZE_LIMIT
| PE_BAD_VERSION
+ | PE_NOT_IMPLEMENTED
+ | PE_DEPTH_LIMIT
deriving ( Eq, Show, Typeable )
data ProtocolExn = ProtocolExn ProtocolExnType String
public static final int SIZE_LIMIT = 3;
public static final int BAD_VERSION = 4;
public static final int NOT_IMPLEMENTED = 5;
+ public static final int DEPTH_LIMIT = 6;
protected int type_ = UNKNOWN;
SIZE_LIMIT = 3,
BAD_VERSION = 4,
INVALID_PROTOCOL = 5,
- MISSING_REQUIRED_FIELD = 6,
+ DEPTH_LIMIT = 6,
errorCode = 0,
__type = 'TProtocolException'
}
return 'Bad version'
elseif self.errorCode == self.INVALID_PROTOCOL then
return 'Invalid protocol'
- elseif self.errorCode == self.MISSING_REQUIRED_FIELD then
- return 'Missing required field'
+ elseif self.errorCode == self.DEPTH_LIMIT then
+ return 'Exceeded size limit'
else
return 'Default (unknown)'
end
INVALID_DATA = 1,
NEGATIVE_SIZE = 2,
SIZE_LIMIT = 3,
- BAD_VERSION = 4;
+ BAD_VERSION = 4,
+ NOT_IMPLEMENTED = 5,
+ DEPTH_LIMIT = 6;
var TProtocolException = function(type, message) {
Error.call(this, message);
| NEGATIVE_SIZE
| SIZE_LIMIT
| BAD_VERSION
+ | NOT_IMPLEMENTED
+ | DEPTH_LIMIT
exception E of exn_type * string;;
use constant NEGATIVE_SIZE => 2;
use constant SIZE_LIMIT => 3;
use constant BAD_VERSION => 4;
+use constant NOT_IMPLEMENTED => 5;
+use constant DEPTH_LIMIT => 6;
+
sub new {
my $classname = shift;
const NEGATIVE_SIZE = 2;
const SIZE_LIMIT = 3;
const BAD_VERSION = 4;
+ const NOT_IMPLEMENTED = 5;
+ const DEPTH_LIMIT = 6;
function __construct($message=null, $code=0) {
parent::__construct($message, $code);
NEGATIVE_SIZE = 2
SIZE_LIMIT = 3
BAD_VERSION = 4
+ NOT_IMPLEMENTED = 5
+ DEPTH_LIMIT = 6
def __init__(self, type=UNKNOWN, message=None):
TException.__init__(self, message)
NEGATIVE_SIZE = 2
SIZE_LIMIT = 3
BAD_VERSION = 4
+ NOT_IMPLEMENTED = 5
+ DEPTH_LIMIT = 6
attr_reader :type