[gnome-documents] Added try/catch around GDataMiner and ZPjMiner
- From: Anna Zacchi <annazacchi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] Added try/catch around GDataMiner and ZPjMiner
- Date: Tue, 28 Aug 2012 19:14:47 +0000 (UTC)
commit b47ec8eb2a0971f4595ae6e2f8d638505791e2ca
Author: Anna Zacchi <azzurroverde gmail com>
Date: Tue Aug 28 20:47:39 2012 +0200
Added try/catch around GDataMiner and ZPjMiner
Without it there was an error in some cases when starting the program.
src/application.js | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index e8b14a0..7950bb2 100644
--- a/src/application.js
+++ b/src/application.js
@@ -261,13 +261,17 @@ const Application = new Lang.Class({
Global.modeController = new WindowMode.ModeController();
Global.notificationManager = new Notifications.NotificationManager();
- // startup a refresh of the gdocs cache
- let gdataMiner = new Miners.GDataMiner();
- this._refreshMinerNow(gdataMiner);
+ try {
+ // startup a refresh of the gdocs cache
+ let gdataMiner = new Miners.GDataMiner();
+ this._refreshMinerNow(gdataMiner);
- // startup a refresh of the skydrive cache
- let zpjMiner = new Miners.ZpjMiner();
- this._refreshMinerNow(zpjMiner);
+ // startup a refresh of the skydrive cache
+ let zpjMiner = new Miners.ZpjMiner();
+ this._refreshMinerNow(zpjMiner);
+ } catch (e) {
+ log('Unable to start miners: ' + e.message);
+ }
this._initActions();
this._initAppMenu();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]