Fix #5054: do not wrap the parse exception.
This commit is contained in:
parent
bdf4e4442b
commit
311c601f1a
|
@ -21,12 +21,7 @@ namespace Oqtane.Shared
|
|||
|
||||
public static int ParseInteger(string value, CultureInfo cultureInfo, int defaultValue)
|
||||
{
|
||||
if (int.TryParse(value, cultureInfo, out int result))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
return defaultValue;
|
||||
return int.Parse(value, cultureInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user