Apache Qpid C++ API
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

qpid/sys/posix/check.h File Reference

#include "qpid/Exception.h"
#include "qpid/Msg.h"
#include <cerrno>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>

Go to the source code of this file.

Defines

#define QPID_POSIX_ERROR(ERRNO)   qpid::Exception(QPID_MSG(qpid::sys::strError(ERRNO)))
#define QPID_POSIX_CHECK(RESULT)   if ((RESULT) < 0) throw QPID_POSIX_ERROR((errno))
 THROW QPID_POSIX_ERROR(errno) if RESULT is less than zero.
#define QPID_POSIX_THROW_IF(ERRNO)   do { int e=(ERRNO); if (e) throw QPID_POSIX_ERROR(e); } while(0)
 Throw a posix error if ERRNO is non-zero.
#define QPID_POSIX_ASSERT_THROW_IF(ERRNO)   do { int e=(ERRNO); if (e) { errno=e; ::perror(0); assert(0); } } while(0)
 Same as _THROW_IF in a release build, but abort a debug build.
#define QPID_POSIX_ABORT_IF(ERRNO)   if ((int) ERRNO) { errno=ERRNO; ::perror(0); abort(); }

Define Documentation

#define QPID_POSIX_ABORT_IF ( ERRNO   )     if ((int) ERRNO) { errno=ERRNO; ::perror(0); abort(); }
#define QPID_POSIX_ASSERT_THROW_IF ( ERRNO   )     do { int e=(ERRNO); if (e) { errno=e; ::perror(0); assert(0); } } while(0)
#define QPID_POSIX_CHECK ( RESULT   )     if ((RESULT) < 0) throw QPID_POSIX_ERROR((errno))

THROW QPID_POSIX_ERROR(errno) if RESULT is less than zero.

Definition at line 36 of file check.h.

#define QPID_POSIX_ERROR ( ERRNO   )     qpid::Exception(QPID_MSG(qpid::sys::strError(ERRNO)))

Definition at line 33 of file check.h.

Referenced by qpid::sys::Condition::wait().

#define QPID_POSIX_THROW_IF ( ERRNO   )     do { int e=(ERRNO); if (e) throw QPID_POSIX_ERROR(e); } while(0)

Throw a posix error if ERRNO is non-zero.

Definition at line 40 of file check.h.


Qpid C++ API Reference
Generated on Mon Jun 7 17:49:08 2010 for Qpid C++ Client API by doxygen 1.6.2-20100208