diff options
author | Mike Roest <msroest@gmail.com> | 2012-12-17 07:16:36 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2012-12-17 07:03:55 -0800 |
commit | 8249f7e68e868831f0099cb1bc8ccba313bf794a (patch) | |
tree | c7f2a270d32442692179c613f78cafd52411936c /src/DotNetOpenAuth.Core/Reporting.cs | |
parent | 84ef4b74365fe78156792cf17bb945a9ace4e03f (diff) | |
download | DotNetOpenAuth-8249f7e68e868831f0099cb1bc8ccba313bf794a.zip DotNetOpenAuth-8249f7e68e868831f0099cb1bc8ccba313bf794a.tar.gz DotNetOpenAuth-8249f7e68e868831f0099cb1bc8ccba313bf794a.tar.bz2 |
Add additional Exception handling to prevent a process crash on a Logger Exception during SendStatsAsync
Diffstat (limited to 'src/DotNetOpenAuth.Core/Reporting.cs')
-rw-r--r-- | src/DotNetOpenAuth.Core/Reporting.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/DotNetOpenAuth.Core/Reporting.cs b/src/DotNetOpenAuth.Core/Reporting.cs index 951bb7c..58939f6 100644 --- a/src/DotNetOpenAuth.Core/Reporting.cs +++ b/src/DotNetOpenAuth.Core/Reporting.cs @@ -519,8 +519,12 @@ namespace DotNetOpenAuth { SendStats(); } catch (Exception ex) { // Something bad and unexpected happened. Just deactivate to avoid more trouble. - Logger.Library.Error("Error while trying to submit statistical report.", ex); broken = true; + try { + Logger.Library.Error("Error while trying to submit statistical report.", ex); + } catch (Exception) { + //swallow exceptions to prevent a crash + } } }); } |