dodo  0.0.1
A C++ library to create containerized Linux services
dodo::common::SystemException Class Reference

Descending from Exception, exceptions based on a dodo::common::SystemError code. More...

#include <exception.hpp>

Inheritance diagram for dodo::common::SystemException:
Collaboration diagram for dodo::common::SystemException:

Public Member Functions

 SystemException (const std::string &file, unsigned int line, const std::string &what, const dodo::common::SystemError &error)
 Constructor. More...
 
 SystemException (const std::string &file, unsigned int line, const std::string &what, const dodo::common::SystemError &error, const DebugObject *thing)
 Constructor. More...
 
- Public Member Functions inherited from dodo::common::Exception
 Exception (const std::string &file, unsigned int line, const std::string &what)
 Construct an Exception. More...
 
 Exception (const std::string &file, unsigned int line, const std::string &what, const DebugObject *thing)
 Construct an Exception. More...
 
const std::string & getFile () const
 Return the source file where the exception was thrown. More...
 
unsigned int getLine () const
 Return the line number in the source file where the exception was thrown. More...
 
virtual const char * what () const noexcept
 Return the exception message. More...
 

Protected Attributes

dodo::common::SystemError error_
 The exception system error. More...
 
- Protected Attributes inherited from dodo::common::Exception
std::string file_
 The source file. More...
 
unsigned int line_
 The source line number. More...
 
std::string msg_
 The exception message. More...
 

Detailed Description

Descending from Exception, exceptions based on a dodo::common::SystemError code.

See also
SystemError

Definition at line 138 of file exception.hpp.

Constructor & Destructor Documentation

◆ SystemException() [1/2]

dodo::common::SystemException::SystemException ( const std::string &  file,
unsigned int  line,
const std::string &  what,
const dodo::common::SystemError error 
)

Constructor.

Parameters
fileThe source file where the exception was raised.
lineThe line number where the exception was raised.
whatThe exception message.
errorThe underlying SystemError.

Definition at line 77 of file exception.cpp.

References error_.

◆ SystemException() [2/2]

dodo::common::SystemException::SystemException ( const std::string &  file,
unsigned int  line,
const std::string &  what,
const dodo::common::SystemError error,
const DebugObject thing 
)

Constructor.

Parameters
fileThe source file where the exception was raised.
lineThe line number where the exception was raised.
whatThe exception message.
errorThe underlying SystemError.
thingThe DebugObject context to the error.

Definition at line 85 of file exception.cpp.

References error_.

Field Documentation

◆ error_

dodo::common::SystemError dodo::common::SystemException::error_
protected

The exception system error.

Definition at line 167 of file exception.hpp.

Referenced by SystemException().


The documentation for this class was generated from the following files: