AI_Project_3.App.ReportErrorToDOM C# (CSharp) Method

ReportErrorToDOM() private method

private ReportErrorToDOM ( System.Windows.ApplicationUnhandledExceptionEventArgs e ) : void
e System.Windows.ApplicationUnhandledExceptionEventArgs
return void
        private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
        {
            try
            {
                string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
                errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");

                System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
            }
            catch (Exception)
            {
            }
        }