Various Thrift fixes, including Application Exception support in Ruby, better errror messages across languages, etc.

Reviewed By: thrift


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665058 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/php/src/transport/TSocketPool.php b/lib/php/src/transport/TSocketPool.php
index 9e5ebcd..b3efb2d 100644
--- a/lib/php/src/transport/TSocketPool.php
+++ b/lib/php/src/transport/TSocketPool.php
@@ -221,7 +221,7 @@
             // Successful connection, return now
             return;
 
-          } catch (Exception $x) {
+          } catch (TException $tx) {
             // Connection failed
           }
         }
@@ -268,7 +268,7 @@
     if ($this->debug_) {
       call_user_func($this->debugHandler_, $error);
     }
-    throw new Exception($error);
+    throw new TException($error);
   }
 }