-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathFlashToolApp.cpp
More file actions
37 lines (30 loc) · 760 Bytes
/
FlashToolApp.cpp
File metadata and controls
37 lines (30 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include "FlashToolApp.h"
#include "Err/Exception.h"
#include "Logger/Log.h"
#include <iostream>
FlashToolApp::FlashToolApp(int &argc, char **argv) :
QApplication(argc, argv)
{
}
bool FlashToolApp::notify(QObject *receiver, QEvent *e)
{
bool result = false;
try
{
result = QApplication::notify(receiver,e);
}
catch(const BaseException &base_exp)
{
std::string msg(base_exp.err_msg());
msg.append("\n");
msg.append(base_exp.context());
LOG("Uncaught BaseException: %s", msg.c_str());
QApplication::exit(1);
}
catch(const std::exception &std_exp)
{
LOG("Uncaught std::exception: %s", std_exp.what());
QApplication::exit(2);
}
return result;
}