System.Management.Automation.ErrorRecord.ToString C# (CSharp) 메소드

ToString() 공개 메소드

public ToString ( ) : string
리턴 string
        public override string ToString()
        {
            return Exception.Message;
        }

Usage Example

예제 #1
0
 internal void ReportEngineStartupError(ErrorRecord errorRecord)
 {
     try
     {
         Cmdlet cmdlet;
         string str;
         if (this.IsModuleCommandCurrentlyRunning(out cmdlet, out str))
         {
             cmdlet.WriteError(errorRecord);
         }
         else
         {
             PSHost engineHostInterface = this.EngineHostInterface;
             if (engineHostInterface != null)
             {
                 PSHostUserInterface uI = engineHostInterface.UI;
                 if (uI != null)
                 {
                     uI.WriteErrorLine(errorRecord.ToString());
                 }
             }
         }
     }
     catch (Exception exception)
     {
         CommandProcessorBase.CheckForSevereException(exception);
     }
 }
All Usage Examples Of System.Management.Automation.ErrorRecord::ToString