Basic exception class for producing file:func:line info + call trace.
The basic functionality provided by the Exception class is to facilitate printing out a message, together with the location of the exception (file, line, funcion name), as well as a call trace if available, when an exception is thrown.
Exception:: Exception(std::string&& message,
std::string&& file = "",
std::string&& function = "",
unsigned int line = 0) explicit noexcept
|message in||String (moved from) with an error message|
|file in||String (moved from) with the file name in which the exception ocurred|
|function in||String (moved from) containing the name of the function|
|line in||Source code line number at which the exception ocurred|
While throwing exceptions is possible calling this constructor, the easiest and recommend way is to use the Assert, ErrChk, and Throw macros. Exception safety: no-throw guarantee: this member function never throws exceptions.
const std::string& tk::
Exception:: func() const noexcept
|Returns||Reference to function name in which the exception occurred|
Accessor to function name