[polari] application: Don't log stacktrace on connection errors



commit 9c6f8b904d05cf67d64d5e20744c451bd4431a0a
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Feb 4 00:18:26 2016 +0100

    application: Don't log stacktrace on connection errors
    
    We do handle connection errors in the UI nowadays, there's really no point
    in spamming the user's terminal/log. So replace logging the stacktrace with
    debug messages for the cases where additional information is useful.

 src/application.js |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index 40b4a0a..b315535 100644
--- a/src/application.js
+++ b/src/application.js
@@ -326,11 +326,13 @@ const Application = new Lang.Class({
             }
 
             if (error && error != ConnectionError.CANCELLED)
-                logError(e);
+                Utils.debug('Account %s disconnected with error %s'.format(
+                            account.get_path_suffix(),
+                            error.replace(Tp.ERROR_PREFIX + '.', '')));
         } catch (e if e.matches(Tp.Error, Tp.Error.CANCELLED)) {
             // interrupted by user request, don't log
         } catch (e) {
-            logError(e, 'Failed to ensure channel');
+            Utils.debug('Failed to ensure channel: ' + e.message);
         }
 
         if (requestData.callback)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]