public static string ToTable(this ErrorRecordWrapper errorRecord) { var table = new Table(new Padding(1)); table.AddPropertyRow("CategoryInfo", errorRecord.CategoryInfo); table.AddPropertyRow("ErrorDetails", errorRecord.ErrorDetails); table.AddPropertyRow("FullyQualifiedErrorId", errorRecord.FullyQualifiedErrorId); table.AddPropertyRow("PipelineIterationInfo", string.Join(";", errorRecord.PipelineIterationInfo)); table.AddPropertyRow("ScriptStackTrace", errorRecord.ScriptStackTrace); table.AddPropertyRow("TargetObject", errorRecord.TargetObject); return(table.ToString()); }
public WrapperException(Exception innerException, ErrorRecord errorRecord) : base(string.Empty, innerException) { ErrorRecordWrapper = new ErrorRecordWrapper(errorRecord); }