[Commits] Rev 3512: Cassandra SE in file:///data0/psergey/dev2/5.5-cassandra-r01/

Sergey Petrunya psergey at askmonty.org
Fri Sep 14 08:03:26 EEST 2012


At file:///data0/psergey/dev2/5.5-cassandra-r01/

------------------------------------------------------------
revno: 3512
revision-id: psergey at askmonty.org-20120914050325-cdnly2zfiziwajnw
parent: psergey at askmonty.org-20120914044434-zfvw8nlv4nu26bf6
committer: Sergey Petrunya <psergey at askmonty.org>
branch nick: 5.5-cassandra-r01
timestamp: Fri 2012-09-14 09:03:25 +0400
message:
  Cassandra SE
  - Also provide handling for generic Thrift exceptions. These are not listed in the 'throws' clause
    of API definition but still can happen.
=== modified file 'storage/cassandra/cassandra_se.cc'
--- a/storage/cassandra/cassandra_se.cc	2012-09-14 04:44:34 +0000
+++ b/storage/cassandra/cassandra_se.cc	2012-09-14 05:03:25 +0000
@@ -160,6 +160,8 @@
     print_error("%s [%s]", ire.what(), ire.why.c_str());
   }catch(NotFoundException nfe){
     print_error("%s", nfe.what());
+  }catch(TException e){
+    print_error("Thrift exception: %s", e.what());
   }catch (...) {
     print_error("Unknown exception");
   }
@@ -191,6 +193,8 @@
     print_error("%s [%s]", ire.what(), ire.why.c_str());
   } catch (NotFoundException nfe) {
     print_error("keyspace not found: %s", nfe.what());
+  }catch(TException e){
+    print_error("Thrift exception: %s", e.what());
   } catch (...) {
     print_error("Unknown exception");
   }
@@ -318,6 +322,8 @@
     print_error("UnavailableException: %s", ue.what());
   } catch (TimedOutException te) {
     print_error("TimedOutException: %s", te.what());
+  }catch(TException e){
+    print_error("Thrift exception: %s", e.what());
   } catch (...) {
     print_error("Unknown exception");
   }
@@ -372,6 +378,8 @@
   } catch (TimedOutException te) {
     print_error("TimedOutException: %s", te.what());
     return true;
+  }catch(TException e){
+    print_error("Thrift exception: %s", e.what());
   } catch (...) {
     print_error("Unknown exception");
     return true;
@@ -477,6 +485,8 @@
     print_error("UnavailableException: %s", ue.what());
   } catch (TimedOutException te) {
     print_error("TimedOutException: %s", te.what());
+  }catch(TException e){
+    print_error("Thrift exception: %s", e.what());
   } catch (...) {
     print_error("Unknown exception");
   }
@@ -561,6 +571,8 @@
     print_error("UnavailableException: %s", ue.what());
   } catch (TimedOutException te) {
     print_error("TimedOutException: %s", te.what());
+  }catch(TException e){
+    print_error("Thrift exception: %s", e.what());
   } catch (...) {
     print_error("Unknown exception");
   }
@@ -586,6 +598,8 @@
     print_error("UnavailableException: %s", ue.what());
   } catch (TimedOutException te) {
     print_error("TimedOutException: %s", te.what());
+  }catch(TException e){
+    print_error("Thrift exception: %s", e.what());
   } catch (...) {
     print_error("Unknown exception");
   }
@@ -642,6 +656,8 @@
     print_error("UnavailableException: %s", ue.what());
   } catch (TimedOutException te) {
     print_error("TimedOutException: %s", te.what());
+  }catch(TException e){
+    print_error("Thrift exception: %s", e.what());
   } catch (...) {
     print_error("Unknown exception");
   }



More information about the commits mailing list