コード例 #1
0
ファイル: Cmdlet.cs プロジェクト: zhuyue1314/Pash
 public void ThrowTerminatingError(ErrorRecord errorRecord)
 {
     if (CommandRuntime == null)
     {
         if (errorRecord.Exception != null)
         {
             throw errorRecord.Exception;
         }
         throw new InvalidOperationException(errorRecord.ToString());
     }
     CommandRuntime.ThrowTerminatingError(errorRecord);
 }