private void Window_Error(object sender, HtmlElementErrorEventArgs e) { // Ignore the error and suppress the error dialog box. wb_google.ScriptErrorsSuppressed = true; e.Handled = true; }
void Window_Error(object sender, HtmlElementErrorEventArgs e) { if (Program.MainForm.SuppressScriptErrors == true) { e.Handled = true; } }
private void HandleWindowError(object sender, HtmlElementErrorEventArgs e) { this.JavascriptExecutionError = e.Description; // Ignore the error and suppress the error dialog box. e.Handled = true; }
void Window_Error(object sender, HtmlElementErrorEventArgs e) { // We got a script error, record it ScriptErrorManager.Instance.RegisterScriptError(e.Url, e.Description, e.LineNumber); // Let the browser know we handled this error. e.Handled = true; }
void Window_Error(object sender, HtmlElementErrorEventArgs e) { if (this.m_bSuppressScriptErrors == true) { e.Handled = true; } }
/// <summary> /// 处理此浏览器中载入的html文档对象的html元素错误. /// 如果HtmlElementErrorsSuppressed设定成true,则设定处理标识为true以防止浏览器 /// 显示这个错误. /// </summary> protected void Window_Error(object sender, HtmlElementErrorEventArgs e) { if (HtmlElementErrorsSuppressed) { e.Handled = true; } }
//对错误进行处理 void Window_Error(object sender, HtmlElementErrorEventArgs e) { // 自己的处理代码 Log.logger(e.Description); System.GC.Collect(); e.Handled = true; }
private void Window_Error(object sender, HtmlElementErrorEventArgs e) { // Ignore the error and suppress the error dialog box. var se = sender; MessageBox.Show(string.Format("错误URL:{0},错误代码行号:{1},错误的详细信息:{2}", e.Url, e.LineNumber, e.Description), "系统提示:"); e.Handled = true; }
/// <summary> /// Called when there is a script error in the window /// </summary> /// <param name="sender">The sending object</param> /// <param name="e">Event arguments</param> private void Window_Error(object sender, HtmlElementErrorEventArgs e) { // Handle the original error e.Handled = true; // Build the error data GEEventArgs ea = new GEEventArgs(); ea.Message = "Document Error"; ea.Data = "line " + e.LineNumber.ToString() + " - " + e.Description; ////string badline = Properties.Resources.Plugin.Split('\n')[e.LineNumber - 1]; // Bubble the error this.OnScriptError(e.ToString(), ea); }
private void Window_Error(object sender, HtmlElementErrorEventArgs e) { string absolutePath = ""; string sourcePath = ""; try { if (e.Url != null) { absolutePath = e.Url.AbsolutePath; if (e.Url.Segments.Length > 0) { sourcePath = string.Format("{0}:{1}", e.Url.Segments[e.Url.Segments.Length - 1], e.LineNumber); } } } catch { } dgvConsole.Rows.Add(new object[] { "exception", e.Description, absolutePath, e.LineNumber, sourcePath }); // Ignore the error and suppress the error dialog box. e.Handled = true; }
private void onOutputViewDocumentWindowError(Object sender, HtmlElementErrorEventArgs htmlElementErrorEventArgs) { htmlElementErrorEventArgs.Handled = true; }
void evWindow_Error(object sender, HtmlElementErrorEventArgs e) { // Let the browser know we handled this error. e.Handled = true; }
void Window_Error(object sender, HtmlElementErrorEventArgs e) { // if (this.MainForm.SuppressScriptErrors == true) e.Handled = true; }
/* * The onerror event fires for run-time errors, but not for compilation errors. * In addition, error dialog boxes raised by script debuggers are not suppressed by returning true. * To turn off script debuggers, disable script debugging in Internet Explorer by choosing Internet * Options from the Tools menu. Click the Advanced tab and select the appropriate check box(es). */ private void scriptWindow_Error(object sender, HtmlElementErrorEventArgs e) { // We got a script error, lie to the browser and // Let the browser know we handled this error. e.Handled = true; }
/// <summary> /// If a script error occurs, stop processing /// </summary> /// <param name="sender">The sender of the event</param> /// <param name="e">The event arguments</param> void Window_Error(object sender, HtmlElementErrorEventArgs e) { navCount = 2; errorText = e.Description; }
//捕获控件的错误 private void Window_Error(object sender, HtmlElementErrorEventArgs e) { // 自己的处理代码 e.Handled = true; }
private void Window_Error(object sender, HtmlElementErrorEventArgs e) { //ScriptErrorsSuppressed e.Handled = true; }
private void OnWebBrowserDocumentWindowError(object sender, HtmlElementErrorEventArgs e) { e.Handled = true; }
void Window_Error(object sender, HtmlElementErrorEventArgs e) { e.Handled = true; }
private void method_1(object sender, HtmlElementErrorEventArgs e) { e.Handled = true; }
private void Window_Error(object sender, HtmlElementErrorEventArgs e) { e.Handled = true; this.Text = "出现了脚本错误" + e.Description; }
/// <summary> /// Handles any native errors in the window and raises a custom script error in their place. /// </summary> /// <param name="w">the window object</param> /// <param name="we">the error arguments</param> private void OnWindow_Error(object w, HtmlElementErrorEventArgs we) { we.Handled = true; this.ScriptError(this, new GEEventArgs("line:" + we.LineNumber, "Description: " + we.Description)); }
void Window_Error(object sender, HtmlElementErrorEventArgs e) { //e.Handled = true; // 阻止其他地方继续处理 //string b = e.Description; //string c = e.Url.ToString(); }
private void webBrowser1_Window_Error(object sender, HtmlElementErrorEventArgs e) { e.Handled = true; }
protected void Window_Error(object sender, HtmlElementErrorEventArgs e) { // Ignore the error and suppress the error dialog box. e.Handled = true; }
private void Window_Error(object sender, HtmlElementErrorEventArgs e) { // 忽略该错误并抑制错误对话框 e.Handled = true; }
/// <summary> /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed. /// <example> /// htmlelementerroreventhandler.BeginInvoke(sender, e, callback); /// </example> /// </summary> public static IAsyncResult BeginInvoke(this HtmlElementErrorEventHandler htmlelementerroreventhandler, Object sender, HtmlElementErrorEventArgs e, AsyncCallback callback) { if (htmlelementerroreventhandler == null) { throw new ArgumentNullException("htmlelementerroreventhandler"); } return(htmlelementerroreventhandler.BeginInvoke(sender, e, callback, null)); }
private void scriptWindow_Error(object sender, HtmlElementErrorEventArgs e) { MessageBox.Show("Suppressed error!"); e.Handled = true; }
private void IgnoreErrorWin(object sender, HtmlElementErrorEventArgs e) { e.Handled = true; }
private void Window_Error(object sender, HtmlElementErrorEventArgs e) { e.Handled = true; // Ignore the error and suppress the error dialog box. }