Luis Garcia
Luis Garcia

Reputation: 1391

InvalidOperationException not being caught

I have a piece of code where I do this:

try{

      ... my code here ...

 }catch(Exception e){

   ... handle all exceptions here
 }

Inside my code an InvalidOperationException is being thrown. However, the catch is not trapping and handling it. How can I trap it? I thought "Exception" would catch everything inside the try?? I did a quick google search and apparently this is a common problem in Silverlight.

Upvotes: 0

Views: 2154

Answers (1)

Luis Garcia
Luis Garcia

Reputation: 1391

The problem with this was that the exception was being thrown in a different thread. I tracked all the threads and set other try/catch in other places and sure enough I got it.

Upvotes: 2

Related Questions