Go to the documentation of this file.
20 #ifndef LIBMESH_LIBMESH_EXCEPTIONS_H
21 #define LIBMESH_LIBMESH_EXCEPTIONS_H
23 #include "libmesh/libmesh_config.h"
25 #ifdef LIBMESH_ENABLE_EXCEPTIONS
30 #define libmesh_noexcept noexcept
68 FileError(
const std::string & filename) :
std::runtime_error(
"Error accessing file: " + filename ) {}
114 std::ostringstream oss;
115 oss <<
"Error code " <<
error_code <<
" during solve." << std::endl;
127 virtual const char *
what() const noexcept
147 #define LIBMESH_THROW(e) do { throw e; } while (0)
148 #define libmesh_try try
149 #define libmesh_catch(e) catch(e)
153 #define LIBMESH_THROW(e) do { std::abort(); } while (0)
155 #define libmesh_catch(e) if (0)
157 #endif // LIBMESH_ENABLE_EXCEPTIONS
159 #endif // LIBMESH_LIBMESH_EXCEPTIONS_H
A class representing a floating point exception.
std::string what_message
string which holds the message built in the constructor.
A class representing that a dynamic cast failed to produce expected output.
The libMesh namespace provides an interface to certain functionality in the library.
A class to represent the internal "this should never happen" errors, to be thrown by "libmesh_error()...
virtual const char * what() const noexcept
Override the what() function to provide a generic error message.
LogicError(const std::string &msg)
A class representing a failed attempt by the library to open a file (or construct an fstream,...
int error_code
The error code generated by the solver.
FileError(const std::string &filename)
A class representing an exception during a solve.
SolverException(int error_code_in)
A class to stub for features that should be in libMesh, but haven't been written yet,...
A class representing a solver's failure to converge, to be thrown by "libmesh_convergence_failure();"...
virtual ~SolverException() noexcept
Virtual destructor, gotta have one of those.