API
 
Loading...
Searching...
No Matches

Augments an exception with the source file and line. More...

#include <exceptions.hpp>

Inheritance diagram for MagAOX::xwcException:
Inheritance graph
Collaboration diagram for MagAOX::xwcException:
Collaboration graph

Public Member Functions

 xwcException ()=delete
 
 xwcException (const std::string &msg, const std::source_location loc=std::source_location::current())
 Constructor.
 
 xwcException (const std::string &msg, int code, const std::source_location loc=std::source_location::current())
 Constructor with code.
 
virtual const char * what () const noexcept
 Get the what string.
 
const std::string & message () const
 Get the message.
 
const std::string file_name () const
 Get the source file.
 
int line () const
 Get the source line.
 
int code () const
 Get the error code.
 

Protected Attributes

std::string m_what
 The full what message (message + file information).
 
std::string m_message
 The explanatory message.
 
std::source_location m_location
 
int m_code { 0 }
 An error code (optional)
 

Detailed Description

Augments an exception with the source file and line.

Template Parameters
baseexceptis the base class exception which takes a string as constructor argument

Definition at line 25 of file exceptions.hpp.


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