/// <summary> /// Send the error record to client. /// </summary> /// <param name="errorRecord">Error record to send.</param> internal void SendErrorRecordToClient(ErrorRecord errorRecord) { errorRecord.SerializeExtendedInfo = (_streamSerializationOptions & RemoteStreamOptions.AddInvocationInfoToErrorRecord) != 0; SendDataAsync(RemotingEncoder.GeneratePowerShellError( errorRecord, _clientRunspacePoolId, _clientPowerShellId)); }
internal void SendErrorRecordToClient(ErrorRecord errorRecord) { using (ServerPowerShellDataStructureHandler.tracer.TraceMethod()) { errorRecord.SerializeExtendedInfo = (this.streamSerializationOptions & RemoteStreamOptions.AddInvocationInfoToErrorRecord) != (RemoteStreamOptions)0; this.SendDataAsync(RemotingEncoder.GeneratePowerShellError((object)errorRecord, this.clientRunspacePoolId, this.clientPowerShellId)); } }