[banshee] Do not ignore exceptions while downloading podcasts
- From: Bertrand Lorentz <blorentz src gnome org>
- To: svn-commits-list gnome org
- Subject: [banshee] Do not ignore exceptions while downloading podcasts
- Date: Sun, 26 Apr 2009 06:10:12 -0400 (EDT)
commit e1e36f11c48b714ea13155c94c8c59f33eaa0916
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date: Sun Apr 26 12:01:30 2009 +0200
Do not ignore exceptions while downloading podcasts
Exceptions during podcast downloads are now logged, and the download is
not erroneously marked as completed. This is a intermediate fix for
BGO #536047.
---
.../Migo/Migo.DownloadCore/HttpFileDownloadTask.cs | 2 +-
src/Libraries/Migo/Migo.Net/AsyncWebClient.cs | 28 +++++++++----------
2 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/src/Libraries/Migo/Migo.DownloadCore/HttpFileDownloadTask.cs b/src/Libraries/Migo/Migo.DownloadCore/HttpFileDownloadTask.cs
index 574e0ab..236ae70 100644
--- a/src/Libraries/Migo/Migo.DownloadCore/HttpFileDownloadTask.cs
+++ b/src/Libraries/Migo/Migo.DownloadCore/HttpFileDownloadTask.cs
@@ -419,7 +419,7 @@ namespace Migo.DownloadCore
try {
if (e.Error != null) {
- //Console.WriteLine ("DT {1} Error: {0}", e.Error, this.Name);
+ Hyena.Log.WarningFormat ("HttpDownloadTask {0} Error: {1}", this.Name, e.Error);
WebException we = e.Error as WebException;
if (we != null) {
diff --git a/src/Libraries/Migo/Migo.Net/AsyncWebClient.cs b/src/Libraries/Migo/Migo.Net/AsyncWebClient.cs
index 2ecd186..dc51b5e 100644
--- a/src/Libraries/Migo/Migo.Net/AsyncWebClient.cs
+++ b/src/Libraries/Migo/Migo.Net/AsyncWebClient.cs
@@ -687,21 +687,19 @@ namespace Migo.Net
while (nread != 0)
{
- try {
- readTimeoutHandle.Reset ();
-
- // <hack>
- // Yeah, Yeah, Yeah, I'll change this later,
- // it's here to get around abort issues.
-
- ar = st.BeginRead (buffer, offset, length, null, null);
- nread = st.EndRead (ar);
-
- // need an auxiliary downloader class to replace this.
- // </hack>
-
- readTimeoutHandle.Set ();
- } catch { return; }
+ readTimeoutHandle.Reset ();
+
+ // <hack>
+ // Yeah, Yeah, Yeah, I'll change this later,
+ // it's here to get around abort issues.
+
+ ar = st.BeginRead (buffer, offset, length, null, null);
+ nread = st.EndRead (ar);
+
+ // need an auxiliary downloader class to replace this.
+ // </hack>
+
+ readTimeoutHandle.Set ();
if (writeToStream) {
dest.Write (buffer, 0, nread);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]