You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by ro...@apache.org on 2012/12/22 21:32:00 UTC

git commit: THRIFT-1801 Sync up TApplicationException codes across languages and thrift implementations Patch: Andrew Cox

Updated Branches:
  refs/heads/master 8fa8aeac9 -> 019314984


THRIFT-1801 Sync up TApplicationException codes across languages and thrift implementations
Patch: Andrew Cox


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/01931498
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/01931498
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/01931498

Branch: refs/heads/master
Commit: 0193149842924b65c5d3761d60055d298470d3ab
Parents: 8fa8aea
Author: Roger Meier <ro...@apache.org>
Authored: Sat Dec 22 21:31:03 2012 +0100
Committer: Roger Meier <ro...@apache.org>
Committed: Sat Dec 22 21:31:03 2012 +0100

----------------------------------------------------------------------
 lib/as3/src/org/apache/thrift/TApplicationError.as |    5 ++-
 .../src/thrift/thrift_application_exception.h      |    5 ++-
 lib/cocoa/src/TApplicationException.h              |    5 ++-
 lib/cocoa/src/TApplicationException.m              |   15 +++++++++
 lib/cpp/src/thrift/TApplicationException.h         |   24 ++++++++++-----
 lib/csharp/src/TApplicationException.cs            |    7 ++++-
 lib/d/src/thrift/protocol/base.d                   |   10 +++++-
 lib/delphi/src/Thrift.pas                          |    7 ++++-
 lib/erl/include/thrift_constants.hrl               |    4 ++-
 lib/go/thrift/tapplication_exception.go            |    3 ++
 lib/hs/src/Thrift.hs                               |    9 +++++
 .../org/apache/thrift/TApplicationException.java   |    3 ++
 .../org/apache/thrift/TApplicationException.java   |    4 ++-
 lib/js/thrift.js                                   |    5 ++-
 lib/nodejs/lib/thrift/thrift.js                    |    5 ++-
 lib/ocaml/src/Thrift.ml                            |    9 +++++
 lib/perl/lib/Thrift.pm                             |   19 +++++++-----
 .../lib/Thrift/Exception/TApplicationException.php |    3 ++
 lib/py/src/Thrift.py                               |   13 ++++++++
 lib/rb/lib/thrift/exceptions.rb                    |    3 ++
 20 files changed, 132 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/01931498/lib/as3/src/org/apache/thrift/TApplicationError.as
----------------------------------------------------------------------
diff --git a/lib/as3/src/org/apache/thrift/TApplicationError.as b/lib/as3/src/org/apache/thrift/TApplicationError.as
index aa3278d..3448fce 100644
--- a/lib/as3/src/org/apache/thrift/TApplicationError.as
+++ b/lib/as3/src/org/apache/thrift/TApplicationError.as
@@ -42,11 +42,14 @@ package org.apache.thrift {
     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();

http://git-wip-us.apache.org/repos/asf/thrift/blob/01931498/lib/c_glib/src/thrift/thrift_application_exception.h
----------------------------------------------------------------------
diff --git a/lib/c_glib/src/thrift/thrift_application_exception.h b/lib/c_glib/src/thrift/thrift_application_exception.h
index be5a8c0..580f4fc 100644
--- a/lib/c_glib/src/thrift/thrift_application_exception.h
+++ b/lib/c_glib/src/thrift/thrift_application_exception.h
@@ -67,7 +67,10 @@ typedef enum
   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 */

http://git-wip-us.apache.org/repos/asf/thrift/blob/01931498/lib/cocoa/src/TApplicationException.h
----------------------------------------------------------------------
diff --git a/lib/cocoa/src/TApplicationException.h b/lib/cocoa/src/TApplicationException.h
index 0ad0b9a..7b027d6 100644
--- a/lib/cocoa/src/TApplicationException.h
+++ b/lib/cocoa/src/TApplicationException.h
@@ -28,7 +28,10 @@ enum {
   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

http://git-wip-us.apache.org/repos/asf/thrift/blob/01931498/lib/cocoa/src/TApplicationException.m
----------------------------------------------------------------------
diff --git a/lib/cocoa/src/TApplicationException.m b/lib/cocoa/src/TApplicationException.m
index 66c2f2b..974dfc5 100644
--- a/lib/cocoa/src/TApplicationException.m
+++ b/lib/cocoa/src/TApplicationException.m
@@ -45,6 +45,21 @@
   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;

http://git-wip-us.apache.org/repos/asf/thrift/blob/01931498/lib/cpp/src/thrift/TApplicationException.h
----------------------------------------------------------------------
diff --git a/lib/cpp/src/thrift/TApplicationException.h b/lib/cpp/src/thrift/TApplicationException.h
index 79f026d..d32a21d 100644
--- a/lib/cpp/src/thrift/TApplicationException.h
+++ b/lib/cpp/src/thrift/TApplicationException.h
@@ -43,7 +43,10 @@ class TApplicationException : public TException {
     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() :
@@ -78,13 +81,18 @@ class TApplicationException : public TException {
   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();

http://git-wip-us.apache.org/repos/asf/thrift/blob/01931498/lib/csharp/src/TApplicationException.cs
----------------------------------------------------------------------
diff --git a/lib/csharp/src/TApplicationException.cs b/lib/csharp/src/TApplicationException.cs
index 57dd375..9aaf6f7 100644
--- a/lib/csharp/src/TApplicationException.cs
+++ b/lib/csharp/src/TApplicationException.cs
@@ -130,7 +130,12 @@ namespace Thrift
 			InvalidMessageType,
 			WrongMethodName,
 			BadSequenceID,
-			MissingResult
+			MissingResult,
+			InternalError,
+			ProtocolError,
+			InvalidTransform,
+			InvalidProtocol,
+			UnsupportedClientType
 		}
 	}
 }

http://git-wip-us.apache.org/repos/asf/thrift/blob/01931498/lib/d/src/thrift/protocol/base.d
----------------------------------------------------------------------
diff --git a/lib/d/src/thrift/protocol/base.d b/lib/d/src/thrift/protocol/base.d
index 97cbb4d..bd65b71 100644
--- a/lib/d/src/thrift/protocol/base.d
+++ b/lib/d/src/thrift/protocol/base.d
@@ -345,7 +345,10 @@ class TApplicationException : TException {
     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 ///
   }
 
   ///
@@ -358,6 +361,11 @@ class TApplicationException : TException {
         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)";
       }
     }

http://git-wip-us.apache.org/repos/asf/thrift/blob/01931498/lib/delphi/src/Thrift.pas
----------------------------------------------------------------------
diff --git a/lib/delphi/src/Thrift.pas b/lib/delphi/src/Thrift.pas
index 189640a..44f12d7 100644
--- a/lib/delphi/src/Thrift.pas
+++ b/lib/delphi/src/Thrift.pas
@@ -43,7 +43,12 @@ type
         InvalidMessageType,
         WrongMethodName,
         BadSequenceID,
-        MissingResult
+        MissingResult,
+        InternalError,
+        ProtocolError,
+        InvalidTransform,
+        InvalidProtocol,
+        UnsupportedClientType
       );
 {$SCOPEDENUMS OFF}
   private

http://git-wip-us.apache.org/repos/asf/thrift/blob/01931498/lib/erl/include/thrift_constants.hrl
----------------------------------------------------------------------
diff --git a/lib/erl/include/thrift_constants.hrl b/lib/erl/include/thrift_constants.hrl
index 61d8e1a..dbfaaf6 100644
--- a/lib/erl/include/thrift_constants.hrl
+++ b/lib/erl/include/thrift_constants.hrl
@@ -53,4 +53,6 @@
 -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).

http://git-wip-us.apache.org/repos/asf/thrift/blob/01931498/lib/go/thrift/tapplication_exception.go
----------------------------------------------------------------------
diff --git a/lib/go/thrift/tapplication_exception.go b/lib/go/thrift/tapplication_exception.go
index fc8bf2e..6b7a75d 100644
--- a/lib/go/thrift/tapplication_exception.go
+++ b/lib/go/thrift/tapplication_exception.go
@@ -32,6 +32,9 @@ const (
   MISSING_RESULT                 = 5
   INTERNAL_ERROR                 = 6
   PROTOCOL_ERROR                 = 7
+  INVALID_TRANSFORM              = 8
+  INVALID_PROTOCOL               = 9
+  UNSUPPORTED_CLIENT_TYPE        = 10
 )
 
 

http://git-wip-us.apache.org/repos/asf/thrift/blob/01931498/lib/hs/src/Thrift.hs
----------------------------------------------------------------------
diff --git a/lib/hs/src/Thrift.hs b/lib/hs/src/Thrift.hs
index 42f5d32..65a2208 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 )

http://git-wip-us.apache.org/repos/asf/thrift/blob/01931498/lib/java/src/org/apache/thrift/TApplicationException.java
----------------------------------------------------------------------
diff --git a/lib/java/src/org/apache/thrift/TApplicationException.java b/lib/java/src/org/apache/thrift/TApplicationException.java
index c294fc3..b54a5ce 100644
--- a/lib/java/src/org/apache/thrift/TApplicationException.java
+++ b/lib/java/src/org/apache/thrift/TApplicationException.java
@@ -45,6 +45,9 @@ public class TApplicationException extends TException {
   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;
 

http://git-wip-us.apache.org/repos/asf/thrift/blob/01931498/lib/javame/src/org/apache/thrift/TApplicationException.java
----------------------------------------------------------------------
diff --git a/lib/javame/src/org/apache/thrift/TApplicationException.java b/lib/javame/src/org/apache/thrift/TApplicationException.java
index de9a162..2f8612a 100644
--- a/lib/javame/src/org/apache/thrift/TApplicationException.java
+++ b/lib/javame/src/org/apache/thrift/TApplicationException.java
@@ -41,7 +41,9 @@ public class TApplicationException extends TException {
   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;
 

http://git-wip-us.apache.org/repos/asf/thrift/blob/01931498/lib/js/thrift.js
----------------------------------------------------------------------
diff --git a/lib/js/thrift.js b/lib/js/thrift.js
index cf89236..39b0a5c 100644
--- a/lib/js/thrift.js
+++ b/lib/js/thrift.js
@@ -87,7 +87,10 @@ Thrift.TApplicationExceptionType = {
     '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) {

http://git-wip-us.apache.org/repos/asf/thrift/blob/01931498/lib/nodejs/lib/thrift/thrift.js
----------------------------------------------------------------------
diff --git a/lib/nodejs/lib/thrift/thrift.js b/lib/nodejs/lib/thrift/thrift.js
index 6c500a5..94223e3 100644
--- a/lib/nodejs/lib/thrift/thrift.js
+++ b/lib/nodejs/lib/thrift/thrift.js
@@ -59,7 +59,10 @@ var TApplicationExceptionType = exports.TApplicationExceptionType = {
   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) {

http://git-wip-us.apache.org/repos/asf/thrift/blob/01931498/lib/ocaml/src/Thrift.ml
----------------------------------------------------------------------
diff --git a/lib/ocaml/src/Thrift.ml b/lib/ocaml/src/Thrift.ml
index 8d423d0..f176a43 100644
--- a/lib/ocaml/src/Thrift.ml
+++ b/lib/ocaml/src/Thrift.ml
@@ -294,6 +294,9 @@ struct
       | MISSING_RESULT
       | INTERNAL_ERROR
       | PROTOCOL_ERROR
+      | INVALID_TRANSFORM
+      | INVALID_PROTOCOL
+      | UNSUPPORTED_CLIENT_TYPE
 
   let typ_of_i = function
       0l -> UNKNOWN
@@ -304,6 +307,9 @@ struct
     | 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
@@ -314,6 +320,9 @@ struct
     | MISSING_RESULT -> 5l
     | INTERNAL_ERROR -> 6l
     | PROTOCOL_ERROR -> 7l
+    | INVALID_TRANSFORM -> 8l
+    | INVALID_PROTOCOL -> 9l
+    | UNSUPPORTED_CLIENT_TYPE -> 10l
 
   class t =
   object (self)

http://git-wip-us.apache.org/repos/asf/thrift/blob/01931498/lib/perl/lib/Thrift.pm
----------------------------------------------------------------------
diff --git a/lib/perl/lib/Thrift.pm b/lib/perl/lib/Thrift.pm
index f526803..67186f2 100644
--- a/lib/perl/lib/Thrift.pm
+++ b/lib/perl/lib/Thrift.pm
@@ -69,14 +69,17 @@ sub new {
 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;

http://git-wip-us.apache.org/repos/asf/thrift/blob/01931498/lib/php/lib/Thrift/Exception/TApplicationException.php
----------------------------------------------------------------------
diff --git a/lib/php/lib/Thrift/Exception/TApplicationException.php b/lib/php/lib/Thrift/Exception/TApplicationException.php
index 55d46e6..9081973 100644
--- a/lib/php/lib/Thrift/Exception/TApplicationException.php
+++ b/lib/php/lib/Thrift/Exception/TApplicationException.php
@@ -40,6 +40,9 @@ class TApplicationException extends TException {
   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);

http://git-wip-us.apache.org/repos/asf/thrift/blob/01931498/lib/py/src/Thrift.py
----------------------------------------------------------------------
diff --git a/lib/py/src/Thrift.py b/lib/py/src/Thrift.py
index 707a8cc..9890af7 100644
--- a/lib/py/src/Thrift.py
+++ b/lib/py/src/Thrift.py
@@ -101,6 +101,9 @@ class TApplicationException(TException):
   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)
@@ -119,6 +122,16 @@ class TApplicationException(TException):
       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'
 

http://git-wip-us.apache.org/repos/asf/thrift/blob/01931498/lib/rb/lib/thrift/exceptions.rb
----------------------------------------------------------------------
diff --git a/lib/rb/lib/thrift/exceptions.rb b/lib/rb/lib/thrift/exceptions.rb
index 2ccc7ce..68cb9e0 100644
--- a/lib/rb/lib/thrift/exceptions.rb
+++ b/lib/rb/lib/thrift/exceptions.rb
@@ -37,6 +37,9 @@ module Thrift
     MISSING_RESULT = 5
     INTERNAL_ERROR = 6
     PROTOCOL_ERROR = 7
+    INVALID_TRANSFORM = 8
+    INVALID_PROTOCOL = 9
+    UNSUPPORTED_CLIENT_TYPE = 10
 
     attr_reader :type