X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;ds=sidebyside;f=pv%2Fapplication.cpp;h=c16c9c4b7c757e3a4312316bb69edb668ef2615e;hb=4e2195c8d934f7f874b612eaace8c6849e8b475d;hp=224cc60007dce1a3464368bedad4f77cc36dfbe0;hpb=dac1bb975265d33e7aeb0e3fc0342260613af9d1;p=pulseview.git
diff --git a/pv/application.cpp b/pv/application.cpp
index 224cc60..c16c9c4 100644
--- a/pv/application.cpp
+++ b/pv/application.cpp
@@ -14,20 +14,28 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see .
*/
-#include "application.h"
+#include "application.hpp"
#include "config.h"
-#include
+#include
+
+#include
+
+#ifdef ENABLE_STACKTRACE
+#include
+#endif
+
+using std::exception;
Application::Application(int &argc, char* argv[]) :
QApplication(argc, argv)
{
setApplicationVersion(PV_VERSION_STRING);
setApplicationName("PulseView");
+ setOrganizationName("sigrok");
setOrganizationDomain("sigrok.org");
}
@@ -35,9 +43,14 @@ bool Application::notify(QObject *receiver, QEvent *event)
{
try {
return QApplication::notify(receiver, event);
- } catch (std::exception& e) {
- std::cerr << "Caught exception: " << e.what() << std::endl;
+ } catch (exception& e) {
+ qDebug().nospace() << "Caught exception of type " << \
+ typeid(e).name() << " (" << e.what() << ")";
+#ifdef ENABLE_STACKTRACE
+ throw e;
+#else
exit(1);
+#endif
return false;
}
}