Red Gate forums :: View topic - Fatal exceptions in Silverlight
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SmartAssembly 6
SmartAssembly 6 forum

Fatal exceptions in Silverlight

Search in SmartAssembly 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
mx



Joined: 13 Jun 2011
Posts: 2

PostPosted: Mon Jun 13, 2011 4:17 pm    Post subject: Fatal exceptions in Silverlight Reply with quote

Hi,
I downloaded and tried SmartAssembly and noticed that it does not report exceptions after which Silverlight stops rendering UI. These exceptions sometimes happen and it would be very nice if SmartAssembly could report them too.

Simple way to simulate this is for example to throw an Exception in MainWnd constructor.

My question is - do you plan to add some support for these fatal exceptions too?

Thanks, M.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6668

PostPosted: Mon Jun 13, 2011 6:04 pm    Post subject: Reply with quote

I've noticed this as well and reported it to development. Basically any exceptions in Silverlight that happen before the UI is initialized or after it's torn down do not trip the unhandled exception handler so exceptions do not get reported.

For instance something happening in the app's constructor does not trigger an error report, but if something happens in the load event of the main window it does.

I don't know at this point if this is possible to fix given the current design of SmartAssembly. I'll need to bring the issue up again.
Back to top
View user's profile Send private message
mx



Joined: 13 Jun 2011
Posts: 2

PostPosted: Tue Jun 14, 2011 9:24 am    Post subject: Reply with quote

For me, the Application.UnhandledException is always called (of course except exceptions which happen before UnhandledException event is hooked up). But not always UI works at the time when unhandled exception is catched which might be what is the problem for SmartAssembly, because Silverlight will not display its dialog and SmartAssembly seems to depend upon this.

In my applications I solve this by waiting 1000ms for the error dialog to open and if it does not I either use javascript DOM to report the exception (if running inside browser) or report the exception to the server without user's confirmation (if running out of browser).

But maybe there are even better solutions on assembly rewriting level?

M.

PS: Also, there is AppDomain.UnhandledException event, which might also help catch some class of exceptions.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group