dodo  0.0.1
A C++ library to create containerized Linux services
exception.hpp File Reference
#include <stdexcept>
#include <string>
#include <sstream>
#include <iomanip>
#include <set>
#include <common/systemerror.hpp>
Include dependency graph for exception.hpp:

Go to the source code of this file.

Data Structures

class  dodo::common::DebugObject
 Interface to objects that support dumping their state to a string. More...
 
class  dodo::common::Exception
 An Exception is thrown in exceptional circumstances, and its occurrence should generally imply that the program should stop, as it has entered a state it was never designed to handle. More...
 
class  dodo::common::SystemException
 Descending from Exception, exceptions based on a dodo::common::SystemError code. More...
 

Namespaces

 dodo
 A C++ platform interface to lean Linux services tailored for containerized deployment.
 
 dodo::common
 Common and utility interfaces.
 

Macros

#define throw_Exception(what)   throw dodo::common::Exception( __FILE__, __LINE__, dodo::common::Puts() << what )
 Throws an Exception, passes FILE and LINE to constructor. More...
 
#define throw_ExceptionObject(what, thing)   throw dodo::common::Exception( __FILE__, __LINE__, dodo::common::Puts() << what, thing )
 Throws an Exception with DebugContext, passes FILE and LINE to constructor. More...
 
#define throw_SystemException(what, errno)   throw dodo::common::SystemException( __FILE__, __LINE__, dodo::common::Puts() << what, errno )
 Throws an Exception with errno, passes FILE and LINE to constructor. More...
 
#define throw_SystemExceptionObject(what, errno, thing)   throw dodo::common::SystemException( __FILE__, __LINE__, dodo::common::Puts() << what, errno, thing )
 Throws an Exception with errno, passes FILE and LINE to constructor. More...
 

Detailed Description

Defines dodo::common::Exception.

Definition in file exception.hpp.

Macro Definition Documentation

◆ throw_Exception

#define throw_Exception (   what)    throw dodo::common::Exception( __FILE__, __LINE__, dodo::common::Puts() << what )

Throws an Exception, passes FILE and LINE to constructor.

Parameters
whatThe exception message passed as << stream to dodo::common::Puts()

Definition at line 174 of file exception.hpp.

◆ throw_ExceptionObject

#define throw_ExceptionObject (   what,
  thing 
)    throw dodo::common::Exception( __FILE__, __LINE__, dodo::common::Puts() << what, thing )

Throws an Exception with DebugContext, passes FILE and LINE to constructor.

Parameters
whatThe exception message as std::string.
thingThe DebugObject as context.

Definition at line 181 of file exception.hpp.

◆ throw_SystemException

#define throw_SystemException (   what,
  errno 
)    throw dodo::common::SystemException( __FILE__, __LINE__, dodo::common::Puts() << what, errno )

Throws an Exception with errno, passes FILE and LINE to constructor.

Parameters
whatThe exception message as std::string.
errnoThe error number.

Definition at line 188 of file exception.hpp.

◆ throw_SystemExceptionObject

#define throw_SystemExceptionObject (   what,
  errno,
  thing 
)    throw dodo::common::SystemException( __FILE__, __LINE__, dodo::common::Puts() << what, errno, thing )

Throws an Exception with errno, passes FILE and LINE to constructor.

Parameters
whatThe exception message as std::string.
errnoThe error number.
thingThe DebugObject as context.

Definition at line 196 of file exception.hpp.