diff options
Diffstat (limited to 'cpp/src/qpid/posix/check.h')
-rw-r--r-- | cpp/src/qpid/posix/check.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cpp/src/qpid/posix/check.h b/cpp/src/qpid/posix/check.h index d1de9360a4..666637b1c2 100644 --- a/cpp/src/qpid/posix/check.h +++ b/cpp/src/qpid/posix/check.h @@ -23,14 +23,16 @@ */ #include <errno.h> +#include <string> +#include <qpid/QpidError.h> namespace qpid { namespace sys { -void check(long result, const char* file, const int line); - -#define CHECK(N) qpid::sys::check(N, __FILE__, __LINE__) +std::string errnoToString(); +#define CHECK0(N) if ((N)!=0) THROW_QPID_ERROR(INTERNAL_ERROR, errnoToString()) +#define CHECKNN(N) if ((N)<0) THROW_QPID_ERROR(INTERNAL_ERROR, errnoToString()) }} |