Changeset 511ff7e


Ignore:
Timestamp:
08/30/17 19:41:28 (5 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
50c848a
Parents:
e4c166a
git-author:
Martín Ferrari <tincho@…> (08/27/17 23:04:57)
git-committer:
Philipp Spitzer <philipp@…> (08/30/17 19:41:28)
Message:

Demangling exception class name from error message of unknown exceptions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/app/application.cpp

    re4c166a r511ff7e  
    4242        return false;
    4343    } catch (...) {
    44         error_message("UNCAUGHT exception: " +
    4544#if defined(__GNUC__) || defined(__llvm__) || defined(__clang__)
    46                 QString(__cxxabiv1::__cxa_current_exception_type()->name())
     45        int status = 0;
     46        char *buff = __cxxabiv1::__cxa_demangle(
     47                __cxxabiv1::__cxa_current_exception_type()->name(),
     48                NULL, NULL, &status);
     49        QString exception_name = QString(buff);
     50        std::free(buff);
    4751#else
    48                 "unknown"
     52        QString exception_name = QString("unknown");
    4953#endif
    50                 );
     54        error_message("UNCAUGHT exception: " + exception_name);
    5155        return false;
    5256    }
Note: See TracChangeset for help on using the changeset viewer.