diff options
Diffstat (limited to 'Source/cmForEachCommand.cxx')
-rw-r--r-- | Source/cmForEachCommand.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx index 3b82e0a..c68b785 100644 --- a/Source/cmForEachCommand.cxx +++ b/Source/cmForEachCommand.cxx @@ -365,6 +365,12 @@ bool TryParseInteger(cmExecutionStatus& status, const std::string& str, int& i) status.SetError(e.str()); cmSystemTools::SetFatalErrorOccured(); return false; + } catch (std::out_of_range&) { + std::ostringstream e; + e << "Integer out of range: '" << str << "'"; + status.SetError(e.str()); + cmSystemTools::SetFatalErrorOccured(); + return false; } return true; |