Silverlight error-handling conventions: There is no relationship between onSilverlightError and ReportErrorToDOM()?
When I see the call System.Windows.Browser.HtmlPage.Window.Eval
(which is evil) in ReportErrorToDOM
(in App.xaml.cs
) this shows me that it has no relationship to onSilverlightError
. So what kind of JavaScript-based scenario calls onSilverlightError
? When will onSilverlightError
definitely be needed? What are Silverlight error-handling conventions in general?
This is a very important comment by Erik Monk but needs more detail:
T开发者_如何转开发here are 2 kinds of terminal errors in Silverlight. 1) Managed errors (hit the managed Application_UnhandledException method). Note that some errors may not even get to this point. If the managed infrastructure can't be loaded for some reason (out of memory error maybe...), you won't get this kind of error. Still, if you can get it, you can use a web service (or the CLOG project) to communicate it back to the server. 2) Javascript errors.
I will seriously cut back on answering my own questions in public but the one detail that needed was setting param name="source"
to some bogus value. Once I did this the onSilverlightError
event fired---thus explaining to me why it is needed. Sorry, again...
精彩评论