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

◆ ExceptionThrowSafe()

template<typename... Types>
void drama::ExceptionThrowSafe ( const std::string  func,
const std::string &  file,
const int  lineNum,
StatusType  status,
const char format,
Types...  args 
)

Create and throw an exception, variable argument list, Safe formatting of arguments.

Deprecated:
Please use the ExceptionThrowSafeF() version. That matches the more modern C++ style and is safer.
See also
DramaTHROW_S to throw with a formatted string, the normal way of invoking this function.
ErsReport for interfaces to the underlying Ers system.
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.
statusA DRAMA Status code to be associated with the message if later converted to a DRAMA report. Set to DRAMA2__CPP_ERROR if not wanted.
formatThe format string. Each % character is to be replaced by the corresponding argument. Note - only the % is needed and used, don't do for example "%d". To output a %, use "%%".
argsArguments to the format. Any arbitrary types can be formatted as long as an overload of the << operator is available for that type.

References CreateRunDramaTask().