From 5a2ee8c347fb1960ed8e2e2940944112c78576c3 Mon Sep 17 00:00:00 2001
From: jonasled <jonas@jonasled.de>
Date: Fri, 18 Oct 2019 10:13:17 +0200
Subject: [PATCH] Added  exception, if fails

---
 export.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/export.py b/export.py
index 1ccc8ef..70d36a5 100644
--- a/export.py
+++ b/export.py
@@ -13,8 +13,7 @@ with sqlite3.connect('db/urls.db') as conn:
     cursor = conn.cursor()
     try: #Try making the database structure, if succeeded, exit, because there can't be any data.
         cursor.execute(create_table)
-        print("No data Found, exiting")
-        exit()
+        raise Exception('No database Found', "Can't find the database ==> No data to export")
     except sqlite3.OperationalError:
         pass
 
-- 
GitLab