1919
2020namespace Microsoft . Azure . Commands . Common . Exceptions
2121{
22+ /// <summary>
23+ /// Representive of ArgumentNullException in Azure PowerShell
24+ /// </summary>
2225 public class AzPSArgumentNullException : PSArgumentNullException , IContainsAzPSErrorData
2326 {
27+ /// <summary>
28+ /// The parameter name that results in this exception.
29+ /// </summary>
2430 private string ErrorParamName
2531 {
2632 get => Data . GetValue < string > ( AzurePSErrorDataKeys . ParamNameKey ) ;
2733 set => Data . SetValue ( AzurePSErrorDataKeys . ParamNameKey , value ) ;
2834 }
2935
36+ /// <summary>
37+ /// ErrorKind that causes this exception.
38+ /// </summary>
3039 public ErrorKind ErrorKind
3140 {
3241 get => Data . GetValue < ErrorKind > ( AzurePSErrorDataKeys . ErrorKindKey ) ;
3342 private set => Data . SetValue ( AzurePSErrorDataKeys . ErrorKindKey , value ) ;
3443 }
3544
45+ /// <summary>
46+ /// The error message which doesn't contain PII.
47+ /// </summary>
3648 public string DesensitizedErrorMessage
3749 {
3850 get => Data . GetValue < string > ( AzurePSErrorDataKeys . DesensitizedErrorMessageKey ) ;
3951 private set => Data . SetValue ( AzurePSErrorDataKeys . DesensitizedErrorMessageKey , value ) ;
4052 }
4153
54+ /// <summary>
55+ /// The number of line when exception happens.
56+ /// </summary>
4257 public int ? ErrorLineNumber
4358 {
4459 get => Data . GetNullableValue < int > ( AzurePSErrorDataKeys . ErrorLineNumberKey ) ;
4560 private set => Data . SetValue ( AzurePSErrorDataKeys . ErrorLineNumberKey , value ) ;
4661 }
4762
63+ /// <summary>
64+ /// The file name when exception happens.
65+ /// </summary>
4866 public string ErrorFileName
4967 {
5068 get => Data . GetValue < string > ( AzurePSErrorDataKeys . ErrorFileNameKey ) ;
5169 private set => Data . SetValue ( AzurePSErrorDataKeys . ErrorFileNameKey , value ) ;
5270 }
5371
72+ /// <summary>
73+ /// Construtor of AzPSArgumentNullException
74+ /// </summary>
75+ /// <param name="message">The error message that explains the reason for the exception.</param>
76+ /// <param name="paramName">The parameter name that results in this exception.</param>
77+ /// <param name="desensitizedMessage">The error message which doesn't contain PII.</param>
78+ /// <param name="lineNumber">The number of line when exception happens.</param>
79+ /// <param name="filePath">The file path when exception happens.</param>
5480 public AzPSArgumentNullException (
5581 string message ,
5682 string paramName ,
@@ -61,6 +87,15 @@ public AzPSArgumentNullException(
6187 {
6288 }
6389
90+ /// <summary>
91+ /// Construtor of AzPSArgumentNullException
92+ /// </summary>
93+ /// <param name="message">The error message that explains the reason for the exception.</param>
94+ /// <param name="paramName">The parameter name that results in this exception.</param>
95+ /// <param name="errorKind">ErrorKind that causes this exception.</param>
96+ /// <param name="desensitizedMessage">The error message which doesn't contain PII.</param>
97+ /// <param name="lineNumber">The number of line when exception happens.</param>
98+ /// <param name="filePath">The file path when exception happens.</param>
6499 public AzPSArgumentNullException (
65100 string message ,
66101 string paramName ,
@@ -80,6 +115,14 @@ public AzPSArgumentNullException(
80115 }
81116 }
82117
118+ /// <summary>
119+ /// Construtor of AzPSArgumentNullException
120+ /// </summary>
121+ /// <param name="message">The error message that explains the reason for the exception.</param>
122+ /// <param name="innerException">The exception that is the cause of the current exception. Default value is null.</param>
123+ /// <param name="desensitizedMessage">The error message which doesn't contain PII.</param>
124+ /// <param name="lineNumber">The number of line when exception happens.</param>
125+ /// <param name="filePath">The file path when exception happens.</param>
83126 public AzPSArgumentNullException (
84127 string message ,
85128 Exception innerException ,
@@ -90,6 +133,15 @@ public AzPSArgumentNullException(
90133 {
91134 }
92135
136+ /// <summary>
137+ /// Construtor of AzPSArgumentNullException
138+ /// </summary>
139+ /// <param name="message">The error message that explains the reason for the exception.</param>
140+ /// <param name="innerException">The exception that is the cause of the current exception. Default value is null.</param>
141+ /// <param name="errorKind">ErrorKind that causes this exception.</param>
142+ /// <param name="desensitizedMessage">The error message which doesn't contain PII.</param>
143+ /// <param name="lineNumber">The number of line when exception happens.</param>
144+ /// <param name="filePath">The file path when exception happens.</param>
93145 public AzPSArgumentNullException (
94146 string message ,
95147 Exception innerException ,
0 commit comments