-
Notifications
You must be signed in to change notification settings - Fork 4k
Add cmdlet for Resolving Hyak and AutoRest errors #3984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@markcowl a few minor comments
Also, there should be an update to the change log
|
||
namespace Microsoft.Azure.Commands.Profile.Errors | ||
{ | ||
[Cmdlet(VerbsDiagnostic.Resolve, "AzureRmError", DefaultParameterSetName = ResolveError.AnyErrorParameterSet)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@markcowl does it make sense to have an alias to Resolve-Error
?
{ | ||
public const string AnyErrorParameterSet = "AnyErrorParameterSet"; | ||
public const string LastErrorParameterSet = "LastErrorParameterSet"; | ||
[Parameter(Mandatory =false, Position =0, HelpMessage ="The error records to resolve", ValueFromPipeline =true, ParameterSetName = AnyErrorParameterSet)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@markcowl nit: can we put an empty line between the last parameter set and the start of this parameter?
|
||
[Parameter(Mandatory = true, HelpMessage = "The last error", ParameterSetName = LastErrorParameterSet)] | ||
public SwitchParameter Last { get; set; } | ||
protected override IAzureContext DefaultContext |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@markcowl nit: can we put an empty line between the last parameter and this property?
} | ||
} | ||
|
||
IEnumerable<ErrorRecord> GetErrorVariable() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@markcowl nit: should the below methods be private if they're only being used for this cmdlet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
methods with no visibility specified are automatically private
|
||
## SYNOPSIS | ||
|
||
Display detailed information about Azure PowerShell errors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@markcowl are the errors specific to Azure PowerShell?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we do special processing for azure powershell errors, but it is explained in the description that it applies to all errors as well
|
||
public ErrorDetails ErrorDetails { get; set; } | ||
|
||
public ErrorCategoryInfo ErrorCategory { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@markcowl nit: can we put an empty line between ErrorCategory
and InvocationInfo
?
Exception = exception; | ||
} | ||
|
||
public bool InnerException { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@markcowl nit: can we put an empty line between InnerException
and Exception
?
} | ||
|
||
public Uri Uri { get; set; } | ||
public string Verb { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@markcowl nit: can we put an empty line between Uri
and Verb
?
…, and explicit visibility modifiers
@azuresdkci test this please |
On-demand: http://azuresdkci.cloudapp.net/view/1-AzurePowerShell/job/powershell-demand/1596/ Want to make sure there are no problems when generating help. LGTM once this succeeds. |
@cormacpayne Is this the whitespace issue again? |
Description
This checklist is used to make sure that common guidelines for a pull request are followed. You can find a more complete discussion of PowerShell cmdlet best practices here.
General Guidelines
Testing Guidelines
Cmdlet Signature Guidelines
ShouldProcess
and haveSupportShouldProcess=true
specified in the cmdlet attribute. You can find more information onShouldProcess
here.OutputType
attribute if any output is produced - if the cmdlet produces no output, it should implement aPassThru
parameter.Cmdlet Parameter Guidelines