ug4
|
Instances of this class or of derived classes are thrown if errors arise. More...
#include <error.h>
Public Member Functions | |
const std::string & | get_file (size_t i) const |
returns the file where a message occured More... | |
unsigned long | get_line (size_t i) const |
returns the line where a message occured More... | |
const std::string & | get_msg () const |
returns the initial message More... | |
const std::string & | get_msg (size_t i) const |
returns a message in the message-stack (innermost is first) More... | |
std::string | get_stacktrace () const |
size_t | num_msg () const |
number of messages in message-stack More... | |
void | push_msg (const char *msg, const char *file=" -- no file -- ", const unsigned long line=0) |
adds a message to the message stack More... | |
void | push_msg (const std::string &msg, const char *file=" -- no file -- ", const unsigned long line=0) |
adds a message to the message stack More... | |
UGError (const char *msg, const char *file=" -- no file -- ", const unsigned long line=0) | |
UGError (const std::string &msg, const char *file=" -- no file -- ", const unsigned long line=0) | |
UGError (const std::string &msg, const std::exception &ex, const char *file, const unsigned long line) | |
virtual | ~UGError () |
virtual destructor More... | |
Protected Attributes | |
std::vector< std::string > | m_vFile |
std::vector< unsigned long > | m_vLine |
std::vector< std::string > | m_vMsg |
Instances of this class or of derived classes are thrown if errors arise.
By default the error-code is 0 and terminate returns false.
|
inline |
References push_msg().
|
inline |
References push_msg().
ug::UGError::UGError | ( | const std::string & | msg, |
const std::exception & | ex, | ||
const char * | file, | ||
const unsigned long | line | ||
) |
References ug::ErrorStringFromStdException(), ex, and push_msg().
|
inlinevirtual |
virtual destructor
|
inline |
returns the file where a message occured
References m_vFile.
Referenced by get_stacktrace(), ug::bridge::RunShell(), ug::vrl::throwUgErrorAsJavaException(), ug_check_registry(), ug_init_bridge(), ug_init_path(), ug_init_plugins(), ug::bridge::lua::UGErrorTraceback(), and ugshell_main().
|
inline |
returns the line where a message occured
References m_vLine.
Referenced by get_stacktrace(), ug::bridge::RunShell(), ug::vrl::throwUgErrorAsJavaException(), ug_check_registry(), ug_init_bridge(), ug_init_path(), ug_init_plugins(), ug::bridge::lua::UGErrorTraceback(), and ugshell_main().
|
inline |
returns the initial message
References m_vMsg.
Referenced by ug::AttachAct(), ug::AttachProperty(), ug::FileReaderSWC::create_grid(), ug::bridge::DebugShell(), ug::ExportGridToSWC(), get_stacktrace(), ug::IntersectCoplanarTriangles(), ug::bridge::RunShell(), ug::vrl::throwUgErrorAsJavaException(), ug_check_registry(), ug_init_bridge(), ug_init_path(), ug_init_plugins(), ug::bridge::lua::UGErrorTraceback(), and ugshell_main().
|
inline |
returns a message in the message-stack (innermost is first)
References m_vMsg.
|
inline |
References get_file(), get_line(), get_msg(), and num_msg().
Referenced by ug::bridge::LUACompiler::createVM().
|
inline |
number of messages in message-stack
References m_vMsg.
Referenced by ug::bridge::DebugShell(), get_stacktrace(), ug::bridge::RunShell(), ug::vrl::throwUgErrorAsJavaException(), ug_check_registry(), ug_init_bridge(), ug_init_path(), ug_init_plugins(), ug::bridge::lua::UGErrorTraceback(), and ugshell_main().
|
inline |
|
inline |
adds a message to the message stack
References m_vFile, m_vLine, and m_vMsg.
Referenced by ug::GridReaderVTU::create_cells(), ug::LocalFiniteElementProvider::register_set(), ug::SubLocalDoFSet< TDim >::SubLocalDoFSet(), UGError(), and ug::UGError_ReferenceElementMissing::UGError_ReferenceElementMissing().
|
protected |
Referenced by get_file(), and push_msg().
|
protected |
Referenced by get_line(), and push_msg().
|
protected |
Referenced by get_msg(), num_msg(), and push_msg().