56#if defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || (defined(__ICC) && (__ICC >= 600))
57#define UB_FUNCTION __PRETTY_FUNCTION__
58#elif defined(__DMC__) && (__DMC__ >= 0x810)
59#define UB_FUNCTION __PRETTY_FUNCTION__
60#elif defined(__FUNCSIG__)
61#define UB_FUNCTION __FUNCSIG__
62#elif (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 600)) || (defined(__IBMCPP__) && (__IBMCPP__ >= 500))
63#define UB_FUNCTION __FUNCTION__
64#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x550)
65#define UB_FUNCTION __FUNC__
66#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
67#define UB_FUNCTION __func__
69#define UB_FUNCTION "(unknown)"
73#define UB_EXARGS __FILE__, __LINE__, UB_FUNCTION
76#define UB_THROW(e) throw boost::enable_current_exception(e)
78#define UB_THROW(e) throw e
93 UbException(
const std::string &file,
const int &line,
const std::string &
err_str) : std::runtime_error(
"")
99 UbException(
const std::string &file,
const int &line,
const std::string &function,
const std::string &
err_str)
100 : std::runtime_error(
"")
122 virtual void addInfo(
const std::string &file,
const int &line,
const std::string &function,
129 virtual const std::vector<std::string>
getInfo()
const
131 std::vector<std::string>
tmp;
133 std::stringstream
str;
144 std::stringstream
str(
"UbExeption");
147 str << (std::string)
"caller[" <<
i <<
"]\n"
virtual void addInfo(const std::string &err_str)
~UbException() noexcept override=default
UbException(const std::string &file, const int &line, const std::string &function, const std::string &err_str)
std::string exceptionString
std::vector< ExceptionData > exceptionData
virtual const std::vector< std::string > getInfo() const
virtual std::string toString() const
const char * what() const noexcept override
UbException(const std::string &file, const int &line, const std::string &err_str)
UbTuple< std::string, int, std::string, std::string > ExceptionData
virtual void addInfo(const std::string &file, const int &line, const std::string &function, const std::string &err_str)
UbException(const std::string &str)
std::shared_ptr< T > SPtr
std::ostream & operator<<(std::ostream &os, const UbException &e)
UbTuple< T1 > makeUbTuple(T1 const &a1)