Skip to content

Commit

Permalink
Restored throwing an error if an ODF setting was out of range GrandOr…
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg68 committed Nov 14, 2023
1 parent ae4f5f1 commit 0e9f864
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/core/config/GOConfigReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,12 @@ int GOConfigReader::ReadInteger(
}

if (retval < nmin || retval > nmax) {
if (type == ODFSetting)
throw wxString::Format(
_("Out of range value at section '%s' entry '%s': %ld"),
group,
key,
retval);
wxLogError(
_("Out of range value at section '%s' entry '%s': %ld. Assumed %d"),
group,
Expand Down Expand Up @@ -456,6 +462,12 @@ double GOConfigReader::ReadFloat(
}

if (retval < nmin || retval > nmax) {
if (type == ODFSetting)
throw wxString::Format(
_("Out of range value at section '%s' entry '%s': %f"),
group,
key,
retval);
wxLogError(
_("Out of range value at section '%s' entry '%s': %f. Assumed %f."),
group,
Expand Down

0 comments on commit 0e9f864

Please sign in to comment.