diff options
author | Michael 'Mickey' Lauer <mickey@vanille-media.de> | 2011-02-25 13:27:32 +0100 |
---|---|---|
committer | Michael 'Mickey' Lauer <mickey@vanille-media.de> | 2011-02-25 13:27:32 +0100 |
commit | e750f1b9786f948605c5633064873f42f43c57f1 (patch) | |
tree | 7d5f6ef7b74bad2ee500e22d43bcbe7c7c13a7f7 /fsotdld | |
parent | 8b24766e00539d86955d578b8e8c3d4b9070e41a (diff) | |
download | cornucopia-e750f1b9786f948605c5633064873f42f43c57f1.tar.gz cornucopia-e750f1b9786f948605c5633064873f42f43c57f1.tar.bz2 cornucopia-e750f1b9786f948605c5633064873f42f43c57f1.zip |
fsotdld: fix error handling in gsm source
Diffstat (limited to 'fsotdld')
-rw-r--r-- | fsotdld/src/plugins/source_gsm/plugin.vala | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/fsotdld/src/plugins/source_gsm/plugin.vala b/fsotdld/src/plugins/source_gsm/plugin.vala index c856a61e..f1abf9b5 100644 --- a/fsotdld/src/plugins/source_gsm/plugin.vala +++ b/fsotdld/src/plugins/source_gsm/plugin.vala @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de> + * Copyright (C) 2009-2011 Michael 'Mickey' Lauer <mlauer@vanille-media.de> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -26,6 +26,9 @@ namespace Source public const string MODULE_NAME_GSM = "source_gsm"; } +/** + * @class Source.Gsm + **/ class Source.Gsm : FsoTime.AbstractSource { FreeSmartphone.GSM.Network ogsmd_device; @@ -65,7 +68,7 @@ class Source.Gsm : FsoTime.AbstractSource public override string repr() { - return ""; + return "<>"; } private bool arrayContainsElement( string[] array, string element ) @@ -92,14 +95,10 @@ class Source.Gsm : FsoTime.AbstractSource var status = yield ogsmd_device.get_status(); yield onGsmNetworkStatusSignal( status ); } - catch ( DBusError e ) + catch ( Error e ) { logger.warning( @"Could not query the status from ogsmd: $(e.message)" ); } - catch ( IOError e2 ) - { - logger.warning( @"Could not query the status from ogsmd: $(e2.message)" ); - } } else { @@ -132,16 +131,11 @@ class Source.Gsm : FsoTime.AbstractSource countrycode = yield odatad_world.get_country_code_for_mcc_mnc( code ); timezones = yield odatad_world.get_timezones_for_country_code( countrycode ); } - catch ( DBusError e ) + catch ( Error e ) { logger.warning( @"Could not query odatad: $(e.message)" ); return; } - catch ( IOError e2 ) - { - logger.warning( @"Could not query odatad: $(e2.message)" ); - return; - } var zonecount = timezones.size(); |