From 7b49153c938c5f005595958626f4f49b9e2fd653 Mon Sep 17 00:00:00 2001 From: Fabian Schlenz Date: Tue, 6 Mar 2018 06:28:37 +0100 Subject: [PATCH] Now catching (and printing) ALL exceptions in CommandLineController. --- .../de/fabianonline/telegram_backup/CommandLineController.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/de/fabianonline/telegram_backup/CommandLineController.kt b/src/main/kotlin/de/fabianonline/telegram_backup/CommandLineController.kt index 332f25a..ee4d846 100644 --- a/src/main/kotlin/de/fabianonline/telegram_backup/CommandLineController.kt +++ b/src/main/kotlin/de/fabianonline/telegram_backup/CommandLineController.kt @@ -140,7 +140,8 @@ class CommandLineController { } else { println("Skipping media download because --no-media is set.") } - } catch (e: Exception) { + } catch (e: Throwable) { + println("An error occured!") e.printStackTrace() logger.error("Exception caught!", e) // If we encountered an exception, we definitely don't want to start the daemon mode now.