nathanwblair / im-only-resting

Automatically exported from code.google.com/p/im-only-resting
Apache License 2.0
1 stars 0 forks source link

Handle TPL exceptions so that they don't cause fatal app exit #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
e.g. when submitting a request to http://ipv4.fiddler:19116 while fiddler is 
not running:

[2012-12-15 22:31:58.9451] [INFO] {4480::15} Swensen.Ior.Core.IorClient - 
responseTask did not run to completion, status=Faulted 
[2012-12-15 22:32:18.5851] [FATAL] {4480::2} Swensen.Ior.Forms.Program - 
Unhandled AppDomain exception, IsTerminating=True 
System.AggregateException: A Task's exception(s) were not observed either by 
Waiting on the Task or accessing its Exception property. As a result, the 
unobserved exception was rethrown by the finalizer thread. ---> 
System.Net.Http.HttpRequestException: An error occurred while sending the 
request. ---> System.Net.WebException: The remote name could not be resolved: 
'ipv4.fiddler'
   at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
   at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.TaskExceptionHolder.Finalize()
---> (Inner Exception #0) System.Net.Http.HttpRequestException: An error 
occurred while sending the request. ---> System.Net.WebException: The remote 
name could not be resolved: 'ipv4.fiddler'
   at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
   at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---<---
    at System.Threading.Tasks.TaskExceptionHolder.Finalize()

Original issue reported on code.google.com by stephen....@gmail.com on 16 Dec 2012 at 3:48

GoogleCodeExporter commented 9 years ago

Original comment by stephen....@gmail.com on 16 Dec 2012 at 4:38

GoogleCodeExporter commented 9 years ago

Original comment by stephen....@gmail.com on 10 Jan 2013 at 11:19