summaryrefslogtreecommitdiff
path: root/lib/hs
diff options
context:
space:
mode:
authorRoger Meier <roger@apache.org>2012-12-22 21:31:03 +0100
committerRoger Meier <roger@apache.org>2012-12-22 21:31:03 +0100
commit0193149842924b65c5d3761d60055d298470d3ab (patch)
treea2f40b909010e1b5c45971b04c57a8daf20bc90e /lib/hs
parent8fa8aeac9a0f2ff4f11ac0ef73fc677bebd7a75f (diff)
downloadthrift-0193149842924b65c5d3761d60055d298470d3ab.tar.gz
THRIFT-1801 Sync up TApplicationException codes across languages and thrift implementations
Patch: Andrew Cox
Diffstat (limited to 'lib/hs')
-rw-r--r--lib/hs/src/Thrift.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/hs/src/Thrift.hs b/lib/hs/src/Thrift.hs
index 42f5d3218..65a220809 100644
--- a/lib/hs/src/Thrift.hs
+++ b/lib/hs/src/Thrift.hs
@@ -54,6 +54,9 @@ data AppExnType
| 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
@@ -65,6 +68,9 @@ 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
@@ -75,6 +81,9 @@ instance Enum AppExnType where
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 )