1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 *   http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20package org.apache.thrift.protocol;
21
22import org.apache.thrift.TException;
23
24class TProtocolException extends TException {
25
26    // WARNING: These are subject to be extended in the future, so we can't use enums
27    // with Haxe 3.1.3 because of https://github.com/HaxeFoundation/haxe/issues/3649
28    public static inline var UNKNOWN : Int = 0;
29    public static inline var INVALID_DATA : Int = 1;
30    public static inline var NEGATIVE_SIZE : Int = 2;
31    public static inline var SIZE_LIMIT : Int = 3;
32    public static inline var BAD_VERSION : Int = 4;
33    public static inline var NOT_IMPLEMENTED : Int = 5;
34    public static inline var DEPTH_LIMIT : Int = 6;
35
36    public function new(error : Int = UNKNOWN, message : String = "") {
37      super(message, error);
38    }
39
40
41}