private void DisplayInnerDetailErrorMessage(ResourceManagementErrorWithDetails error) { WriteError(string.Format(ErrorFormat, error.Code, error.Message)); if (error.Details != null) { foreach (var innerError in error.Details) { DisplayInnerDetailErrorMessage(innerError); } } }
public static PSResourceManagerError ToPSResourceManagerError(this ResourceManagementErrorWithDetails error) { PSResourceManagerError rmError = new PSResourceManagerError { Code = error.Code, Message = error.Message, Target = string.IsNullOrEmpty(error.Target) ? null : error.Target }; if (error.Details != null) { List <PSResourceManagerError> innerRMError = new List <PSResourceManagerError>(); error.Details.ForEach(detail => innerRMError.Add(detail.ToPSResourceManagerError())); rmError.Details = innerRMError; } return(rmError); }
private void DisplayInnerDetailErrorMessage(ResourceManagementErrorWithDetails error) { var ex = new Exception(string.Format(ErrorFormat, error.Code, error.Message)); WriteError( new ErrorRecord( ex, string.Empty, ErrorCategory.NotSpecified, null)); if (error.Details != null) { foreach (var innerError in error.Details) { DisplayInnerDetailErrorMessage(innerError); } } }
internal ResourceGroupExportResult(object template, ResourceManagementErrorWithDetails error) { Template = template; Error = error; }
private void DisplayInnerDetailErrorMessage(ResourceManagementErrorWithDetails error) { WriteError(string.Format(ErrorFormat, error.Code, error.Message)); if (error.Details != null) { foreach (var innerError in error.Details) { DisplayInnerDetailErrorMessage(innerError); } } }
internal DeploymentValidateResult(ResourceManagementErrorWithDetails error, DeploymentPropertiesExtended properties) { Error = error; Properties = properties; }