Hex  1.0
Hydrogen-electron collision solver
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions
exception Class Reference

Exception class. More...

#include <misc.h>

Inheritance diagram for exception:
Inheritance graph
[legend]
Collaboration diagram for exception:
Collaboration graph
[legend]

Public Member Functions

template<class... Params>
exception exception::Params::::::p exception () noexcept
 Destructor. More...
 
const char * what () const noexcept(true)
 Return pointer to the exception text. More...
 

Detailed Description

Custom exception class with easy printf-like constructor.

Use something like:

* throw exception("[Error %d] Pointer has the value 0x%x!", id, ptr);
*
Note
The behaviour of the function "snprintf" that is used in the constructor is expected to follow C99 specification, i.e. that it returns the needed size of the output buffer when called as snprinf(nullptr,0,format,args).

Constructor & Destructor Documentation

template<class... Params>
exception exception::Params::::::p exception::exception ( )
inlinenoexcept

Member Function Documentation

const char* exception::what ( ) const
inlinenoexcept

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