9#ifndef CPPCOMMON_ERRORS_EXCEPTIONS_H 
   10#define CPPCOMMON_ERRORS_EXCEPTIONS_H 
   23#define throwex throw __LOCATION__ + 
   54    const char* 
what() const noexcept override;
 
   57    virtual std::
string string() const;
 
   60    friend std::ostream& operator<<(std::ostream& os, const 
Exception& ex)
 
   61    { os << ex.
string(); 
return os; }
 
 
   66    { instance._location = 
location; 
return std::forward<T>(instance); }
 
 
 
  144    std::string 
string() 
const override;
 
 
const char * what() const noexcept override
Get string identifying exception.
 
Exception & operator=(const Exception &)=default
 
SourceLocation _location
Exception location.
 
const std::string & message() const noexcept
Get exception message.
 
std::string _message
Exception message.
 
friend T && operator+(const SourceLocation &location, T &&instance)
Link exception with source location.
 
std::string _cache
Cached exception string.
 
const SourceLocation & location() const noexcept
Get exception location.
 
Exception(Exception &&)=default
 
Exception(const Exception &)=default
 
virtual ~Exception()=default
 
Exception & operator=(Exception &&)=default
 
Exception(const std::string &message="")
Default class constructor.
 
std::string string() const
Get the string from the current source location.
 
int _system_error
System error code.
 
const std::string & system_message() const noexcept
Get system error message.
 
SystemException(const std::string &message, int error)
Create system exception based on the given exception message and system error code.
 
int system_error() const noexcept
Get system error code.
 
std::string _system_message
System error message.
 
std::string string() const override
Get string from the current system exception.
 
SystemException(int error)
Create system exception based on the given system error code.
 
SystemException(const std::string &message)
Create system exception based on the given exception message.
 
SystemException()
Create system exception based on the last system error code.
 
Exceptions inline implementation.
 
C++ Common project definitions.
 
Source location definition.