Silverlight 4 Getting full exceptions

柔情痞子 提交于 2019-12-10 10:36:11

问题


I have a silverlight application elevated trust deployed at my company and some errors I get the "debugging resource strings are unavailable" I was wondering if there was any way currently for silverlight 4 to get the full error message without installing the developer version of silverlight on every single machine.

Thanks in advance


回答1:


Hope this article helps u... Check this

By default, the full exception strings are not enabled in silverlight. You need to enable it in the slr.dll.managed_manifest file.




回答2:


I would wrap the code giving the exception in try/catch brackets and then use MessageBox.Show to display the error message;

try
{
    // Code that crashes
}
catch (Exception e)
{
    MessageBox.Show("Error: " + e);
}

Exception also contains some other useful variables. Hope this helps.



来源:https://stackoverflow.com/questions/7879697/silverlight-4-getting-full-exceptions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!