abujehad139 / google-api-dotnet-client

Automatically exported from code.google.com/p/google-api-dotnet-client
Apache License 2.0
0 stars 0 forks source link

Handle exception in background thread #305

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
One of our users complains about an exception which is thrown when there is a 
use in the APM pattern.
We should be able to catch exceptions which are thrown during async operations 
on the main thread and handle them.
Currently there is an exception thrown on background thread which causes the 
application to crash without any option to catch it!

For more details:
http://stackoverflow.com/questions/186854/how-to-prevent-an-exception-in-a-backg
round-thread-from-terminating-an-applicati

Original issue reported on code.google.com by pele...@google.com on 25 Mar 2013 at 10:46

GoogleCodeExporter commented 9 years ago

Original comment by pele...@google.com on 13 Apr 2013 at 4:24

GoogleCodeExporter commented 9 years ago
The following https://codereview.appspot.com/8596049/#ps238002 CL will solve 
this issue!
We are going to upgrade our library to PCL, use HttpClient and Task classes and 
as a result our exception handling will be much much better!

Original comment by pele...@google.com on 10 May 2013 at 2:32

GoogleCodeExporter commented 9 years ago

Original comment by pele...@google.com on 10 May 2013 at 2:33

GoogleCodeExporter commented 9 years ago
With the upgrade to .NET 4.0 and using TPL (and Task API) we handle exception 
deferentially - we handle AggregateExceptions which occur in a background task, 
and throw the inner exception to the user!

Original comment by pele...@google.com on 22 May 2013 at 10:49