Ejemplo n.º 1
0
        public int OnScriptError(Host.IActiveScriptError error)
        {
            System.Runtime.InteropServices.ComTypes.EXCEPINFO exceptionInfo;
            HResult.ThrowOnFailure(error.GetExceptionInfo(out exceptionInfo));

            string sourceLine;
            HResult.ThrowOnFailure(error.GetSourceLineText(out sourceLine));

            throw new InvalidOperationException("unhandled JavaScript exception: " + exceptionInfo.bstrDescription);
        }