Changeset 330b8cb in confclerk_git


Ignore:
Timestamp:
08/30/17 19:26:49 (5 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
e4c166a
Parents:
81e085d
git-author:
Martín Ferrari <tincho@…> (08/27/17 22:27:34)
git-committer:
Philipp Spitzer <philipp@…> (08/30/17 19:26:49)
Message:

More specific error message for "unknown" exceptions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/app/application.cpp

    r81e085d r330b8cb  
    1818 * ConfClerk.  If not, see <http://www.gnu.org/licenses/>.
    1919 */
     20#if defined(__GNUC__) || defined(__llvm__) || defined(__clang__)
     21#include <cxxabi.h>
     22#endif
     23#include <exception>
     24
    2025#include "application.h"
    2126#include "errormessage.h"
     
    3338        error_message("UNCAUGHT OrmException: " + e.text());
    3439        return false;
     40    } catch (std::exception& e) {
     41        error_message("UNCAUGHT exception: " + QString(e.what()));
     42        return false;
    3543    } catch (...) {
    36         error_message("UNCAUGHT EXCEPTION: unknown");
     44        error_message("UNCAUGHT exception: " +
     45#if defined(__GNUC__) || defined(__llvm__) || defined(__clang__)
     46                QString(__cxxabiv1::__cxa_current_exception_type()->name())
     47#else
     48                "unknown"
     49#endif
     50                );
    3751        return false;
    3852    }
Note: See TracChangeset for help on using the changeset viewer.