コード例 #1
0
        public override void Message(p4dn.Error err)
        {
            switch (err.Severity)
            {
            case p4dn.Error.ErrorSeverity.Empty:      // E_EMPTY (0) | no error
                // Is this ever even a legit severity???  I've never hit it in my testing.
                _P4Result.AddString(err.Fmt());
                break;

            case p4dn.Error.ErrorSeverity.Info:      // E_INFO  (1) | information, not necessarily an error
                _P4Result.AddInfo(err.Fmt());
                break;

            case p4dn.Error.ErrorSeverity.Warning:      // E_WARN  (2) | a minor error occurred
                _P4Result.AddWarning(err.Fmt());
                break;

            case p4dn.Error.ErrorSeverity.Failed:      // E_FAILED(3) | the command was used incorrectly
                _P4Result.AddError(err.Fmt());
                break;

            case p4dn.Error.ErrorSeverity.Fatal:      // E_FATAL (4) | fatal error, the command can't be processed
                _P4Result.AddError(err.Fmt());
                break;

            default:
                //TODO throw an error... unknown severity
                break;
            }
        }
コード例 #2
0
 /// <summary>
 /// Outputs the info.
 /// </summary>
 /// <param name="data">The data.</param>
 public override void OutputInfo(string data)
 {
     _P4Result.AddInfo(data);
 }