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

Exception class. More...

#include <misc.h>

Inheritance diagram for exception:
Inheritance graph
Collaboration diagram for exception:
Collaboration graph

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);
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 ( )

Member Function Documentation

const char* exception::what ( ) const

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