[hyena] [HttpDownloader] Catch Finished handler exceptions
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hyena] [HttpDownloader] Catch Finished handler exceptions
- Date: Wed, 14 Jul 2010 18:20:50 +0000 (UTC)
commit 19d29cc2377a15c317008b912f5e7ef7fb12a71b
Author: Gabriel Burt <gabriel burt gmail com>
Date: Wed Jul 14 11:18:50 2010 -0700
[HttpDownloader] Catch Finished handler exceptions
Otherwise they'd not be logged or seen, since they'd just abort the
worker thread. And, if running async, an exception would have prevented
the caller from getting unblocked.
Hyena/Hyena.Downloader/HttpDownloader.cs | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/Hyena/Hyena.Downloader/HttpDownloader.cs b/Hyena/Hyena.Downloader/HttpDownloader.cs
index e2d722f..26877db 100644
--- a/Hyena/Hyena.Downloader/HttpDownloader.cs
+++ b/Hyena/Hyena.Downloader/HttpDownloader.cs
@@ -271,7 +271,11 @@ namespace Hyena.Downloader
{
var handler = Finished;
if (handler != null) {
- handler (this);
+ try {
+ handler (this);
+ } catch (Exception e) {
+ Log.Exception (String.Format ("HttpDownloader.Finished handler ({0})", Uri), e);
+ }
}
if (sync_event != null) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]