12#ifndef DETAILED_EXCEPTION_HH
13#define DETAILED_EXCEPTION_HH
17#include <boost/lexical_cast.hpp>
37 std::runtime_error(std::string(
"Exception in ") + file +
" at line " +
boost::lexical_cast<std::string>(line) +
".\n" + message)
49 IOException(std::string
const& message, std::string
const& file,
int const line) :
62 FileIOException(std::string
const& message, std::string
const& filename_, std::string
const& file,
int const line) :
63 IOException(std::string(
"File I/O exception for file ") + filename_ +
".\n" + message,file,line),
filename(filename_)
77 LookupException (std::string
const& message, std::string
const& file,
int const line):
209 GridException(std::string
const& message, std::string
const& file,
int const line) :
A wrapper class for conveniently providing exceptions with context information.
DetailedException(std::string const &message, std::string const &file, int const line)
To be raised if a direct solver fails.
DirectSolverException(std::string const &message, std::string const &file, int const line)
An exception class for file IO errors.
FileIOException(std::string const &message, std::string const &filename_, std::string const &file, int const line)
An exception class for grid related errors.
GridException(std::string const &message, std::string const &file, int const line)
An exception class for IO errors.
IOException(std::string const &message, std::string const &file, int const line)
To be raised if an iterative solver detects the problem to be infeasible (has no valid solution).
InfeasibleProblemException(std::string const &message, std::string const &file, int const line)
To be raised if an iterative solver fails.
IterativeSolverException(std::string const &message, std::string const &file, int const line)
A base class for linear algebra exceptions.
LinearAlgebraException(std::string const &message, std::string const &file, int const line)
To be raised if a linesearch fails.
LinesearchException(std::string const &message, std::string const &file, int const line)
An exception that can be thrown whenever a key lookup fails.
LookupException(std::string const &message, std::string const &file, int const line)
To be raised if the matrix is not positive definite.
NonpositiveMatrixException(std::string const &message, std::string const &file, int const line)
To be raised if the matrix is nonsquare.
NonsquareMatrixException(std::string const &message, std::string const &file, int const line)
To be raised if the matrix is singular.
SingularMatrixException(std::string const &message, std::string const &file, int const line)
To be raised if an iterative solver detects the optimization problem to be unbounded (has no valid so...
UnboundedProblemException(std::string const &message, std::string const &file, int const line)