diff --git a/src/main/java/de/fabianonline/telegram_backup/CommandLineController.java b/src/main/java/de/fabianonline/telegram_backup/CommandLineController.java index 064f06d..fc9ae57 100644 --- a/src/main/java/de/fabianonline/telegram_backup/CommandLineController.java +++ b/src/main/java/de/fabianonline/telegram_backup/CommandLineController.java @@ -176,6 +176,7 @@ public class CommandLineController { } } catch (Exception e) { e.printStackTrace(); + logger.error("Exception caught!", e); } finally { if (CommandLineOptions.cmd_daemon) { handler.setUser(user, client); diff --git a/src/main/java/de/fabianonline/telegram_backup/exporter/HTMLExporter.java b/src/main/java/de/fabianonline/telegram_backup/exporter/HTMLExporter.java index b74c811..b7267c8 100644 --- a/src/main/java/de/fabianonline/telegram_backup/exporter/HTMLExporter.java +++ b/src/main/java/de/fabianonline/telegram_backup/exporter/HTMLExporter.java @@ -45,7 +45,7 @@ import org.slf4j.LoggerFactory; public class HTMLExporter { private static Logger logger = LoggerFactory.getLogger(HTMLExporter.class); - public void export(UserManager user) { + public void export(UserManager user) throws IOException { try { Database db = new Database(user, null); @@ -147,7 +147,8 @@ public class HTMLExporter { logger.debug("Done exporting."); } catch (IOException e) { e.printStackTrace(); - throw new RuntimeException("Exception above!"); + logger.error("Caught an exception!", e); + throw e; } }