/// <summary> /// JS minification error handler /// </summary> /// <param name="source">The source of the event</param> /// <param name="args">A Microsoft.Ajax.Utilities.ContextErrorEventArgs /// that contains the event data</param> public void JsMinificationErrorHandler(object source, ContextErrorEventArgs args) { ContextError error = args.Error; if (error.Severity <= 2) { var errorDetails = new MinificationErrorInfo(error.Message, error.StartLine, error.StartColumn, string.Empty); if (error.IsError) { _errors.Add(errorDetails); } else { _warnings.Add(errorDetails); } } }
/// <summary> /// CSS minification error handler /// </summary> /// <param name="source">The source of the event</param> /// <param name="args">A Microsoft.Ajax.Utilities.ContextErrorEventArgs /// that contains the event data</param> public void CssMinificationErrorHandler(object source, ContextErrorEventArgs args) { ContextError error = args.Error; if (error.Severity <= 2) { var errorDetails = new MinificationErrorInfo(error.Message, error.StartLine, error.StartColumn, string.Empty); if (error.IsError) { _errors.Add(errorDetails); } else { _warnings.Add(errorDetails); } } }
void OnJavaScriptError(object sender, ContextErrorEventArgs e) { //Console.WriteLine(e.Error); // throw new Exception(e.Error.ToString()); }
/// <summary> /// JS-parser error handler /// </summary> /// <param name="source">The source of the event</param> /// <param name="args">A Microsoft.Ajax.Utilities.ContextErrorEventArgs that /// contains the event data</param> private void ParserErrorHandler(object source, ContextErrorEventArgs args) { ContextError error = args.Error; if (error.Severity <= Severity) { throw new MicrosoftAjaxParsingException(FormatContextError(error)); } }