diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2012-09-14 08:44:34 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2012-09-14 08:44:34 +0400 |
commit | d6f2d692c129412a72549085d5cfe83a1edae1b5 (patch) | |
tree | 722cc1865e0680edf83bbe6836684e82626e3833 /storage/cassandra | |
parent | 16fec32ecc2492cf8c2d56f0f03d6bfb2a1b7f2b (diff) | |
download | mariadb-git-d6f2d692c129412a72549085d5cfe83a1edae1b5.tar.gz |
Cassandra SE
- Catch all kinds of exceptions when calling Thrift code.
Diffstat (limited to 'storage/cassandra')
-rw-r--r-- | storage/cassandra/cassandra_se.cc | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/storage/cassandra/cassandra_se.cc b/storage/cassandra/cassandra_se.cc index 6eba141cf58..dbaa00f8d1e 100644 --- a/storage/cassandra/cassandra_se.cc +++ b/storage/cassandra/cassandra_se.cc @@ -160,9 +160,8 @@ bool Cassandra_se_impl::connect(const char *host, const char *keyspace_arg) print_error("%s [%s]", ire.what(), ire.why.c_str()); }catch(NotFoundException nfe){ print_error("%s", nfe.what()); - } - catch(...) { - print_error("Unknown Exception"); + }catch (...) { + print_error("Unknown exception"); } cur_consistency_level= ConsistencyLevel::ONE; @@ -192,7 +191,10 @@ bool Cassandra_se_impl::setup_ddl_checks() print_error("%s [%s]", ire.what(), ire.why.c_str()); } catch (NotFoundException nfe) { print_error("keyspace not found: %s", nfe.what()); + } catch (...) { + print_error("Unknown exception"); } + return true; } @@ -316,6 +318,8 @@ bool Cassandra_se_impl::do_insert() print_error("UnavailableException: %s", ue.what()); } catch (TimedOutException te) { print_error("TimedOutException: %s", te.what()); + } catch (...) { + print_error("Unknown exception"); } return res; @@ -368,6 +372,9 @@ bool Cassandra_se_impl::get_slice(char *key, size_t key_len, bool *found) } catch (TimedOutException te) { print_error("TimedOutException: %s", te.what()); return true; + } catch (...) { + print_error("Unknown exception"); + return true; } column_data_it= column_data_vec.begin(); @@ -470,6 +477,8 @@ bool Cassandra_se_impl::get_range_slices(bool last_key_as_start_key) print_error("UnavailableException: %s", ue.what()); } catch (TimedOutException te) { print_error("TimedOutException: %s", te.what()); + } catch (...) { + print_error("Unknown exception"); } key_slice_it= key_slice_vec.begin(); @@ -552,6 +561,8 @@ bool Cassandra_se_impl::truncate() print_error("UnavailableException: %s", ue.what()); } catch (TimedOutException te) { print_error("TimedOutException: %s", te.what()); + } catch (...) { + print_error("Unknown exception"); } return res; @@ -575,6 +586,8 @@ bool Cassandra_se_impl::remove_row() print_error("UnavailableException: %s", ue.what()); } catch (TimedOutException te) { print_error("TimedOutException: %s", te.what()); + } catch (...) { + print_error("Unknown exception"); } return res; @@ -629,6 +642,8 @@ bool Cassandra_se_impl::multiget_slice() print_error("UnavailableException: %s", ue.what()); } catch (TimedOutException te) { print_error("TimedOutException: %s", te.what()); + } catch (...) { + print_error("Unknown exception"); } return res; |