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);
}
}