From 7b28f8b7d0513dc21ef8cce71b3e67a04e8d6cf3 Mon Sep 17 00:00:00 2001 From: Fabian Schlenz Date: Mon, 25 Jul 2016 18:44:37 +0200 Subject: [PATCH] Small code fixes / improvements. --- .../fabianonline/telegram_backup/CommandLineController.java | 5 ----- .../java/de/fabianonline/telegram_backup/UserManager.java | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/de/fabianonline/telegram_backup/CommandLineController.java b/src/main/java/de/fabianonline/telegram_backup/CommandLineController.java index ae39621..46f18e1 100644 --- a/src/main/java/de/fabianonline/telegram_backup/CommandLineController.java +++ b/src/main/java/de/fabianonline/telegram_backup/CommandLineController.java @@ -69,11 +69,6 @@ public class CommandLineController { if (CommandLineOptions.cmd_list_accounts) this.list_accounts(); logger.debug("Initializing TelegramApp"); - if (CommandLineOptions.cmd_debug_telegram) { - //System.setProperty(org.slf4j.impl.SimpleLogger.DEFAULT_LOG_LEVEL_KEY, "DEBUG"); - } else { - //System.setProperty(org.slf4j.impl.SimpleLogger.DEFAULT_LOG_LEVEL_KEY, "ERROR"); - } app = new TelegramApp(Config.APP_ID, Config.APP_HASH, Config.APP_MODEL, Config.APP_SYSVER, Config.APP_APPVER, Config.APP_LANG); logger.trace("Checking accounts"); diff --git a/src/main/java/de/fabianonline/telegram_backup/UserManager.java b/src/main/java/de/fabianonline/telegram_backup/UserManager.java index e452a21..ad063d9 100644 --- a/src/main/java/de/fabianonline/telegram_backup/UserManager.java +++ b/src/main/java/de/fabianonline/telegram_backup/UserManager.java @@ -50,9 +50,9 @@ public class UserManager { try { TLUserFull full_user = this.client.usersGetFullUser(new TLInputUserSelf()); this.user = full_user.getUser().getAsUser(); - } catch (Exception e) { + } catch (RpcErrorException e) { // This may happen. Ignoring it. - logger.debug("Ignoring exception", e); + logger.debug("Ignoring exception:", e); } }