summaryrefslogtreecommitdiffstats
path: root/src/librados
diff options
context:
space:
mode:
Diffstat (limited to 'src/librados')
-rw-r--r--src/librados/librados_c.cc1
-rw-r--r--src/librados/librados_cxx.cc7
2 files changed, 3 insertions, 5 deletions
diff --git a/src/librados/librados_c.cc b/src/librados/librados_c.cc
index e4bfc4e8d1b..0494c9baa5b 100644
--- a/src/librados/librados_c.cc
+++ b/src/librados/librados_c.cc
@@ -45,7 +45,6 @@ using std::map;
using std::set;
using std::vector;
using std::list;
-using std::runtime_error;
#define dout_subsys ceph_subsys_rados
#undef dout_prefix
diff --git a/src/librados/librados_cxx.cc b/src/librados/librados_cxx.cc
index 42deb1843e5..41d6102e265 100644
--- a/src/librados/librados_cxx.cc
+++ b/src/librados/librados_cxx.cc
@@ -41,6 +41,7 @@
#include <vector>
#include <list>
#include <stdexcept>
+#include <system_error>
#ifdef WITH_LTTNG
#define TRACEPOINT_DEFINE
@@ -57,7 +58,6 @@ using std::map;
using std::set;
using std::vector;
using std::list;
-using std::runtime_error;
#define dout_subsys ceph_subsys_rados
#undef dout_prefix
@@ -761,9 +761,8 @@ void librados::NObjectIteratorImpl::get_next()
return;
}
else if (ret) {
- ostringstream oss;
- oss << "rados returned " << cpp_strerror(ret);
- throw std::runtime_error(oss.str());
+ throw std::system_error(-ret, std::system_category(),
+ "rados_nobjects_list_next");
}
if (cur_obj.impl == NULL)