19
19
20
20
namespace Microsoft . Azure . Commands . Common . Exceptions
21
21
{
22
+ /// <summary>
23
+ /// Representive of ArgumentNullException in Azure PowerShell
24
+ /// </summary>
22
25
public class AzPSArgumentNullException : PSArgumentNullException , IContainsAzPSErrorData
23
26
{
27
+ /// <summary>
28
+ /// The parameter name that results in this exception.
29
+ /// </summary>
24
30
private string ErrorParamName
25
31
{
26
32
get => Data . GetValue < string > ( AzurePSErrorDataKeys . ParamNameKey ) ;
27
33
set => Data . SetValue ( AzurePSErrorDataKeys . ParamNameKey , value ) ;
28
34
}
29
35
36
+ /// <summary>
37
+ /// ErrorKind that causes this exception.
38
+ /// </summary>
30
39
public ErrorKind ErrorKind
31
40
{
32
41
get => Data . GetValue < ErrorKind > ( AzurePSErrorDataKeys . ErrorKindKey ) ;
33
42
private set => Data . SetValue ( AzurePSErrorDataKeys . ErrorKindKey , value ) ;
34
43
}
35
44
45
+ /// <summary>
46
+ /// The error message which doesn't contain PII.
47
+ /// </summary>
36
48
public string DesensitizedErrorMessage
37
49
{
38
50
get => Data . GetValue < string > ( AzurePSErrorDataKeys . DesensitizedErrorMessageKey ) ;
39
51
private set => Data . SetValue ( AzurePSErrorDataKeys . DesensitizedErrorMessageKey , value ) ;
40
52
}
41
53
54
+ /// <summary>
55
+ /// The number of line when exception happens.
56
+ /// </summary>
42
57
public int ? ErrorLineNumber
43
58
{
44
59
get => Data . GetNullableValue < int > ( AzurePSErrorDataKeys . ErrorLineNumberKey ) ;
45
60
private set => Data . SetValue ( AzurePSErrorDataKeys . ErrorLineNumberKey , value ) ;
46
61
}
47
62
63
+ /// <summary>
64
+ /// The file name when exception happens.
65
+ /// </summary>
48
66
public string ErrorFileName
49
67
{
50
68
get => Data . GetValue < string > ( AzurePSErrorDataKeys . ErrorFileNameKey ) ;
51
69
private set => Data . SetValue ( AzurePSErrorDataKeys . ErrorFileNameKey , value ) ;
52
70
}
53
71
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>
54
80
public AzPSArgumentNullException (
55
81
string message ,
56
82
string paramName ,
@@ -61,6 +87,15 @@ public AzPSArgumentNullException(
61
87
{
62
88
}
63
89
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>
64
99
public AzPSArgumentNullException (
65
100
string message ,
66
101
string paramName ,
@@ -80,6 +115,14 @@ public AzPSArgumentNullException(
80
115
}
81
116
}
82
117
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>
83
126
public AzPSArgumentNullException (
84
127
string message ,
85
128
Exception innerException ,
@@ -90,6 +133,15 @@ public AzPSArgumentNullException(
90
133
{
91
134
}
92
135
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>
93
145
public AzPSArgumentNullException (
94
146
string message ,
95
147
Exception innerException ,
0 commit comments