Skip to content

Commit 6af36bd

Browse files
author
Kapil Borle
committed
Add error message for invalid data type
1 parent baac430 commit 6af36bd

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Engine/Settings.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,10 +412,12 @@ private void parseSettingsHashtable(Hashtable settingsHashtable)
412412

413413
case "includedefaultrules":
414414
case "recursecustomrulepath":
415-
// todo localize
416415
if (!(val is bool))
417416
{
418-
throw new InvalidDataException(string.Format(CultureInfo.CurrentCulture, "Not a boolean"));
417+
throw new InvalidDataException(string.Format(
418+
CultureInfo.CurrentCulture,
419+
Strings.SettingsValueTypeMustBeBool,
420+
settingKey));
419421
}
420422

421423
var booleanVal = (bool)val;

Engine/Strings.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,9 @@
273273
<data name="SettingsNotParsable" xml:space="preserve">
274274
<value>Cannot parse settings. Will abort the invocation.</value>
275275
</data>
276+
<data name="SettingsValueTypeMustBeBool" xml:space="preserve">
277+
<value>{0} property must be of type bool.</value>
278+
</data>
276279
<data name="ModuleDepHandlerTempLocation" xml:space="preserve">
277280
<value>Temporary module location: {0}.</value>
278281
</data>

0 commit comments

Comments
 (0)