this allows the catcher to retrieve the original error code
Signed-off-by: Casey Bodley <cbodley@redhat.com>
using std::set;
using std::vector;
using std::list;
-using std::runtime_error;
#define dout_subsys ceph_subsys_rados
#undef dout_prefix
#include <vector>
#include <list>
#include <stdexcept>
+#include <system_error>
#ifdef WITH_LTTNG
#define TRACEPOINT_DEFINE
using std::set;
using std::vector;
using std::list;
-using std::runtime_error;
#define dout_subsys ceph_subsys_rados
#undef dout_prefix
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)
}
}
}
- catch (const std::runtime_error& e) {
+ catch (const std::exception& e) {
cerr << e.what() << std::endl;
return -1;
}
}
}
}
- catch (const std::runtime_error& e) {
+ catch (const std::exception& e) {
cerr << e.what() << std::endl;
ret = -1;
goto out;