Alsvinn  0.5.3
The fast FVM simulator with UQ support
Macros
Exception.hpp File Reference
#include <sstream>
#include <iostream>
#include <exception>
#include <stdexcept>
#include <boost/current_function.hpp>
#include "alsutils/debug/stacktrace.hpp"

Go to the source code of this file.

Macros

#define THROW(message)
 

Macro Definition Documentation

◆ THROW

#define THROW (   message)
Value:
{\
std::stringstream ssForException; \
ssForException << message; \
ssForException << std::endl << "At " << __FILE__<<":" << __LINE__ << std::endl;\
ssForException << std::endl << "In function: " << BOOST_CURRENT_FUNCTION << std::endl;\
ssForException << "Stacktrace:" << std::endl; \
ssForException << alsutils::debug::getLongStacktrace() << std::endl;\
throw std::runtime_error(ssForException.str()); \
\
}
std::string getLongStacktrace()
Definition: stacktrace.cpp:107

Throws an exception with the given message