summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/posix/check.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/posix/check.cpp')
-rw-r--r--cpp/src/qpid/posix/check.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/cpp/src/qpid/posix/check.cpp b/cpp/src/qpid/posix/check.cpp
index 5e8e9e7ca2..3470906639 100644
--- a/cpp/src/qpid/posix/check.cpp
+++ b/cpp/src/qpid/posix/check.cpp
@@ -22,10 +22,12 @@
#include <qpid/QpidError.h>
#include "check.h"
-void qpid::sys::check(long result, const char* file, const int line) {
- if (result != 0) {
- char buf[512];
- char* msg = strerror_r(errno, buf, sizeof(buf));
- throw QpidError(errno, msg, file, line);
- }
+namespace qpid {
+namespace sys {
+
+std::string strError() {
+ char buf[512];
+ return strerror_r(errno, buf, sizeof(buf));
}
+
+}}