From 76a829dbfd0c232e27c169e1c29345a177e05c05 Mon Sep 17 00:00:00 2001
From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz>
Date: Tue, 30 Oct 2018 15:44:59 +0100
Subject: [PATCH] fix control may reach end of non void function

---
 agui2/src/Graphics/Dialogs/OutputDialog.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/agui2/src/Graphics/Dialogs/OutputDialog.cpp b/agui2/src/Graphics/Dialogs/OutputDialog.cpp
index 77982b47f6..9333daf973 100644
--- a/agui2/src/Graphics/Dialogs/OutputDialog.cpp
+++ b/agui2/src/Graphics/Dialogs/OutputDialog.cpp
@@ -105,7 +105,7 @@ TabType OutputDialog::getCurrentTabType() const {
         return TabType::Image;
     }
 
-    Q_ASSERT(false);
+    throw std::logic_error ( "Invalid tab type" );
 }
 
 std::pair<QString, QString> OutputDialog::getCurrentTabFileFilter() const {
@@ -115,5 +115,5 @@ std::pair<QString, QString> OutputDialog::getCurrentTabFileFilter() const {
         case TabType::DOT: return { "DOT files (*.dot)", ".dot" };
         case TabType::Image: return { "PNG files (*.png)", ".png" };
     }
-    Q_ASSERT(false);
+    throw std::logic_error ( "Invalid tab type" );
 }
-- 
GitLab