QDebug operator<<(QDebug debug, const Exception &exception)
{
    debug.nospace() << "Exception: " << exception.type() << "\n"
                       "Function:  " << exception.function() << "\n"
                       "File:      " << exception.file() << "\n"
                       "Line:      " << exception.line() << "\n";
    if (!exception.description().isEmpty())
        debug.nospace() << exception.description();

    if (!exception.backTrace().isEmpty())
        debug.nospace() << exception.backTrace();

    return debug.space();
}
Exemple #2
0
 /// Construct an Exception instance copied from other
 Exception(
     const Exception& other) ///< [in] Exception copied
     noexcept
     : std::exception(other) {
   set_description(other.description());
 }