blocxx
Namespaces | Defines | Functions

Assertion.hpp File Reference

#include "blocxx/BLOCXX_config.h"
#include "blocxx/Exception.hpp"

Go to the source code of this file.

Namespaces

namespace  BLOCXX_NAMESPACE
 

Taken from RFC 1321.


Defines

#define BLOCXX_ASSERT(CON)
 BLOCXX_ASSERT works similar to the assert() macro, but instead of calling abort(), it throws an AssertionException.
#define BLOCXX_ASSERTMSG(CON, MSG)
 BLOCXX_ASSERTMSG works the same as BLOCXX_ASSERT, but with a second string parameter that will be added to the exception message on failure.

Functions

 BLOCXX_NAMESPACE::BLOCXX_DECLARE_APIEXCEPTION (Assertion, BLOCXX_COMMON_API)

Define Documentation

#define BLOCXX_ASSERT (   CON)

BLOCXX_ASSERT works similar to the assert() macro, but instead of calling abort(), it throws an AssertionException.

Parameters:
CONThe condition which will be evaluated.

Definition at line 57 of file Assertion.hpp.

Referenced by BLOCXX_NAMESPACE::ServerSocketImpl::accept(), BLOCXX_NAMESPACE::GenericRWLockImpl< IdT, CompareT >::acquireReadLock(), BLOCXX_NAMESPACE::GenericRWLockImpl< IdT, CompareT >::acquireWriteLock(), BLOCXX_NAMESPACE::BaseStreamBuffer::buffer_from_device(), BLOCXX_NAMESPACE::BaseStreamBuffer::buffer_to_device(), BLOCXX_NAMESPACE::UTF8Utils::charCount(), BLOCXX_NAMESPACE::CmdLineParser::CmdLineParser(), BLOCXX_NAMESPACE::SocketBaseImpl::connect(), BLOCXX_NAMESPACE::Socket::createShutDownMechanism(), BLOCXX_NAMESPACE::ThreadCounter::decThreadCount(), BLOCXX_NAMESPACE::ServerSocketImpl::fillAddrParms(), BLOCXX_NAMESPACE::DelayedFormat::formatWithString(), BLOCXX_NAMESPACE::SocketAddress::getPort(), BLOCXX_NAMESPACE::Thread::join(), BLOCXX_NAMESPACE::Logger::Logger(), BLOCXX_NAMESPACE::String::operator[](), BLOCXX_NAMESPACE::Logger::processLogMessage(), BLOCXX_NAMESPACE::GenericRWLockImpl< IdT, CompareT >::releaseWriteLock(), BLOCXX_NAMESPACE::Select::selectRW(), BLOCXX_NAMESPACE::Select::selectRWEpoll(), BLOCXX_NAMESPACE::Select::selectRWPoll(), BLOCXX_NAMESPACE::Select::selectRWSelect(), BLOCXX_NAMESPACE::ServerSocketImpl::ServerSocketImpl(), BLOCXX_NAMESPACE::Logger::setDefaultComponent(), BLOCXX_NAMESPACE::Exec::PreExec::setNewProcessGroup(), BLOCXX_NAMESPACE::Socket::shutdownAllSockets(), BLOCXX_NAMESPACE::SocketBaseImpl::SocketBaseImpl(), BLOCXX_NAMESPACE::String::String(), BLOCXX_NAMESPACE::ThreadBarrier::ThreadBarrier(), BLOCXX_NAMESPACE::Thread::threadRunner(), BLOCXX_NAMESPACE::SocketAddress::toString(), BLOCXX_NAMESPACE::UTF8Utils::UTF8toUCS4(), and BLOCXX_NAMESPACE::SocketUtils::waitForIO().

#define BLOCXX_ASSERTMSG (   CON,
  MSG 
)

BLOCXX_ASSERTMSG works the same as BLOCXX_ASSERT, but with a second string parameter that will be added to the exception message on failure.

Parameters:
CONThe condition which will be evaluated.
MSGThe extra message. A C string literal.

Definition at line 71 of file Assertion.hpp.

Referenced by BLOCXX_NAMESPACE::LogAppender::LogAppender().