Jpp 21.0.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
Exception.hh File Reference
#include <exception>
#include <string>
#include <ostream>
#include <sstream>
#include <functional>

Go to the source code of this file.

Classes

class  Exception
 General exception. More...
 

Macros

#define MAKE_EXCEPTION(JException_t, A)
 Make exception.
 
#define THROW(JException_t, A)
 Marco for throwing exception with std::ostream compatible message.
 

Macro Definition Documentation

◆ MAKE_EXCEPTION

#define MAKE_EXCEPTION ( JException_t,
A )
Value:
std::invoke( [&]() { std::ostringstream out; out << __FILE__ << ':' << __LINE__ << std::endl << A; return JException_t(out.str()); } )

Make exception.

Parameters
JException_texception
Amessage

Definition at line 68 of file Exception.hh.

◆ THROW

#define THROW ( JException_t,
A )
Value:
do { throw MAKE_EXCEPTION(JException_t, A); } while(0)
#define MAKE_EXCEPTION(JException_t, A)
Make exception.
Definition Exception.hh:68

Marco for throwing exception with std::ostream compatible message.

Parameters
Exception_texception
Amessage

Definition at line 78 of file Exception.hh.