Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
d6f2d692
Commit
d6f2d692
authored
Sep 14, 2012
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cassandra SE
- Catch all kinds of exceptions when calling Thrift code.
parent
16fec32e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
storage/cassandra/cassandra_se.cc
storage/cassandra/cassandra_se.cc
+18
-3
No files found.
storage/cassandra/cassandra_se.cc
View file @
d6f2d692
...
@@ -160,9 +160,8 @@ bool Cassandra_se_impl::connect(const char *host, const char *keyspace_arg)
...
@@ -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
());
print_error
(
"%s [%s]"
,
ire
.
what
(),
ire
.
why
.
c_str
());
}
catch
(
NotFoundException
nfe
){
}
catch
(
NotFoundException
nfe
){
print_error
(
"%s"
,
nfe
.
what
());
print_error
(
"%s"
,
nfe
.
what
());
}
}
catch
(...)
{
catch
(...)
{
print_error
(
"Unknown exception"
);
print_error
(
"Unknown Exception"
);
}
}
cur_consistency_level
=
ConsistencyLevel
::
ONE
;
cur_consistency_level
=
ConsistencyLevel
::
ONE
;
...
@@ -192,7 +191,10 @@ bool Cassandra_se_impl::setup_ddl_checks()
...
@@ -192,7 +191,10 @@ bool Cassandra_se_impl::setup_ddl_checks()
print_error
(
"%s [%s]"
,
ire
.
what
(),
ire
.
why
.
c_str
());
print_error
(
"%s [%s]"
,
ire
.
what
(),
ire
.
why
.
c_str
());
}
catch
(
NotFoundException
nfe
)
{
}
catch
(
NotFoundException
nfe
)
{
print_error
(
"keyspace not found: %s"
,
nfe
.
what
());
print_error
(
"keyspace not found: %s"
,
nfe
.
what
());
}
catch
(...)
{
print_error
(
"Unknown exception"
);
}
}
return
true
;
return
true
;
}
}
...
@@ -316,6 +318,8 @@ bool Cassandra_se_impl::do_insert()
...
@@ -316,6 +318,8 @@ bool Cassandra_se_impl::do_insert()
print_error
(
"UnavailableException: %s"
,
ue
.
what
());
print_error
(
"UnavailableException: %s"
,
ue
.
what
());
}
catch
(
TimedOutException
te
)
{
}
catch
(
TimedOutException
te
)
{
print_error
(
"TimedOutException: %s"
,
te
.
what
());
print_error
(
"TimedOutException: %s"
,
te
.
what
());
}
catch
(...)
{
print_error
(
"Unknown exception"
);
}
}
return
res
;
return
res
;
...
@@ -368,6 +372,9 @@ bool Cassandra_se_impl::get_slice(char *key, size_t key_len, bool *found)
...
@@ -368,6 +372,9 @@ bool Cassandra_se_impl::get_slice(char *key, size_t key_len, bool *found)
}
catch
(
TimedOutException
te
)
{
}
catch
(
TimedOutException
te
)
{
print_error
(
"TimedOutException: %s"
,
te
.
what
());
print_error
(
"TimedOutException: %s"
,
te
.
what
());
return
true
;
return
true
;
}
catch
(...)
{
print_error
(
"Unknown exception"
);
return
true
;
}
}
column_data_it
=
column_data_vec
.
begin
();
column_data_it
=
column_data_vec
.
begin
();
...
@@ -470,6 +477,8 @@ bool Cassandra_se_impl::get_range_slices(bool last_key_as_start_key)
...
@@ -470,6 +477,8 @@ bool Cassandra_se_impl::get_range_slices(bool last_key_as_start_key)
print_error
(
"UnavailableException: %s"
,
ue
.
what
());
print_error
(
"UnavailableException: %s"
,
ue
.
what
());
}
catch
(
TimedOutException
te
)
{
}
catch
(
TimedOutException
te
)
{
print_error
(
"TimedOutException: %s"
,
te
.
what
());
print_error
(
"TimedOutException: %s"
,
te
.
what
());
}
catch
(...)
{
print_error
(
"Unknown exception"
);
}
}
key_slice_it
=
key_slice_vec
.
begin
();
key_slice_it
=
key_slice_vec
.
begin
();
...
@@ -552,6 +561,8 @@ bool Cassandra_se_impl::truncate()
...
@@ -552,6 +561,8 @@ bool Cassandra_se_impl::truncate()
print_error
(
"UnavailableException: %s"
,
ue
.
what
());
print_error
(
"UnavailableException: %s"
,
ue
.
what
());
}
catch
(
TimedOutException
te
)
{
}
catch
(
TimedOutException
te
)
{
print_error
(
"TimedOutException: %s"
,
te
.
what
());
print_error
(
"TimedOutException: %s"
,
te
.
what
());
}
catch
(...)
{
print_error
(
"Unknown exception"
);
}
}
return
res
;
return
res
;
...
@@ -575,6 +586,8 @@ bool Cassandra_se_impl::remove_row()
...
@@ -575,6 +586,8 @@ bool Cassandra_se_impl::remove_row()
print_error
(
"UnavailableException: %s"
,
ue
.
what
());
print_error
(
"UnavailableException: %s"
,
ue
.
what
());
}
catch
(
TimedOutException
te
)
{
}
catch
(
TimedOutException
te
)
{
print_error
(
"TimedOutException: %s"
,
te
.
what
());
print_error
(
"TimedOutException: %s"
,
te
.
what
());
}
catch
(...)
{
print_error
(
"Unknown exception"
);
}
}
return
res
;
return
res
;
...
@@ -629,6 +642,8 @@ bool Cassandra_se_impl::multiget_slice()
...
@@ -629,6 +642,8 @@ bool Cassandra_se_impl::multiget_slice()
print_error
(
"UnavailableException: %s"
,
ue
.
what
());
print_error
(
"UnavailableException: %s"
,
ue
.
what
());
}
catch
(
TimedOutException
te
)
{
}
catch
(
TimedOutException
te
)
{
print_error
(
"TimedOutException: %s"
,
te
.
what
());
print_error
(
"TimedOutException: %s"
,
te
.
what
());
}
catch
(...)
{
print_error
(
"Unknown exception"
);
}
}
return
res
;
return
res
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment