示例#1
0
        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;
              }
        }
示例#2
0
 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);
       }
 }