void OnScriptError(object sender, ScriptErrorEventArgs e) { if (String.IsNullOrEmpty(e.Message)) return; switch (e.Type) { case ErrorMessageFormat.Error: m_errorContent.AddErrorMessage(e.Line, e.Column, e.Path, e.Message); break; case ErrorMessageFormat.Warning: m_outputContent.AppendText(e.Message); break; default: break; } }
private void OnScriptError(string message, string path, int? line, int? column, ErrorMessageFormat format) { if (ScriptError != null) { var args = new ScriptErrorEventArgs { Message = message, Path = path, Line = (line == null) ? -1 : (int)line, Column = (column == null) ? -1 : (int)column, Type = format }; ScriptError(this, args); } }