AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface

◆ Exception() [2/5]

drama::Exception::Exception ( const std::string  func,
const std::string &  file,
const int  lineNum,
const std::string &  message = "",
const StatusType  status = DRAMA2__CPP_ERROR,
const bool  alwaysStacktrace = false 
)

Create an Exception.

This is the main constructors, most others delegate to this one.

Parameters
funcName of the function where the exception was thrown
fileName of the file in which the exception was constructed.
lineNumLine number where the exception was constructed.
messageA textual message to associate with the exception.
statusA DRAMA Status code to be associated with the message if later converted to a DRAMA report. Defaults to DRAMA2__CPP_ERROR
alwaysStacktraceIf set true, then we always output the stack trace when printing the exception or reporting to ERS. This might be set true in cases where the throw is made deep within a call tree due to a failure at a high level, hence seeing the stack trace is needed to work out what went wrong. Defaults to false.