Skip to content

Commit 97d3d13

Browse files
committed
Check for NRE
1 parent 7eea4c6 commit 97d3d13

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceWithParameterBaseCmdlet.cs

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -188,21 +188,25 @@ protected Hashtable GetTemplateParameterObject(Hashtable templateParameterObject
188188
protected string GetDeploymentDebugLogLevel(string deploymentDebugLogLevel)
189189
{
190190
string debugSetting = string.Empty;
191-
switch(deploymentDebugLogLevel.ToLower())
191+
if(!string.IsNullOrEmpty(deploymentDebugLogLevel))
192192
{
193-
case "all":
194-
debugSetting = "RequestContent,ResponseContent";
195-
break;
196-
case "requestcontent":
197-
debugSetting = "RequestContent";
198-
break;
199-
case "responsecontent":
200-
debugSetting = "ResponseContent";
201-
break;
202-
case "none":
203-
debugSetting = null;
204-
break;
193+
switch (deploymentDebugLogLevel.ToLower())
194+
{
195+
case "all":
196+
debugSetting = "RequestContent,ResponseContent";
197+
break;
198+
case "requestcontent":
199+
debugSetting = "RequestContent";
200+
break;
201+
case "responsecontent":
202+
debugSetting = "ResponseContent";
203+
break;
204+
case "none":
205+
debugSetting = null;
206+
break;
207+
}
205208
}
209+
206210
return debugSetting;
207211
}
208212
}

0 commit comments

Comments
 (0)