argos_exception.h File Reference
#include <stdexcept>
#include <sstream>
Include dependency graph for argos_exception.h:

Go to the source code of this file.

Classes

class  argos::CARGoSException
 The exception that wraps all errors in ARGoS. More...
 

Namespaces

 argos
 The namespace containing all the ARGoS related code.
 

Macros

#define THROW_ARGOSEXCEPTION(message)   { std::ostringstream what; what << message; throw CARGoSException(what.str()); }
 This macro throws an ARGoS exception with the passed message. More...
 
#define THROW_ARGOSEXCEPTION_NESTED(message, nested)   { std::ostringstream what; what << message; throw CARGoSException(what.str(), &nested); }
 This macro throws an ARGoS exception with the passed message and nesting the passed exception. More...
 
#define ARGOS_ASSERT(condition, message)   { if ( !(condition) ) THROW_ARGOSEXCEPTION(message); }
 When code is compiled in debug, this macro throws an ARGoS exception with the passed message if the specified condition is not met. More...
 

Macro Definition Documentation

#define ARGOS_ASSERT (   condition,
  message 
)    { if ( !(condition) ) THROW_ARGOSEXCEPTION(message); }

When code is compiled in debug, this macro throws an ARGoS exception with the passed message if the specified condition is not met.

When code is compiled in release, this macro does nothing.

Definition at line 122 of file argos_exception.h.

#define THROW_ARGOSEXCEPTION (   message)    { std::ostringstream what; what << message; throw CARGoSException(what.str()); }

This macro throws an ARGoS exception with the passed message.

Definition at line 111 of file argos_exception.h.

#define THROW_ARGOSEXCEPTION_NESTED (   message,
  nested 
)    { std::ostringstream what; what << message; throw CARGoSException(what.str(), &nested); }

This macro throws an ARGoS exception with the passed message and nesting the passed exception.

Definition at line 115 of file argos_exception.h.