r1460@opsdev009 (orig r77478): dreiss | 2008-01-11 12:59:12 -0800
[amiethrift.git] / lib / csharp / src / Protocol / TProtocolException.cs
blob0941a81e2d6f6bb06a40adf72a176ebf3149adae
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
6 namespace Thrift.Protocol
8 class TProtocolException : Exception
10 public const int UNKNOWN = 0;
11 public const int INVALID_DATA = 1;
12 public const int NEGATIVE_SIZE = 2;
13 public const int SIZE_LIMIT = 3;
14 public const int BAD_VERSION = 4;
16 protected int type_ = UNKNOWN;
18 public TProtocolException()
19 : base()
23 public TProtocolException(int type)
24 : base()
26 type_ = type;
29 public TProtocolException(int type, String message)
30 : base(message)
32 type_ = type;
35 public TProtocolException(String message)
36 : base(message)
40 public int getType()
42 return type_;