diff options
author | nyamatongwe <unknown> | 2013-04-15 20:35:22 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2013-04-15 20:35:22 +1000 |
commit | 76562e6f4ff9dcbe71f8fdddd3b986e1484c0315 (patch) | |
tree | a83c39b6e76a66b781f13280bd831fc79939d07d | |
parent | 11173e2c5c822283e53af1713a42b348f2e504e0 (diff) | |
download | scintilla-mirror-76562e6f4ff9dcbe71f8fdddd3b986e1484c0315.tar.gz |
Existing code fills 0 length ranges and ranges after document end so simply
return instead of throwing exceptions.
-rw-r--r-- | src/RunStyles.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/RunStyles.cxx b/src/RunStyles.cxx index b74053e75..82d924a23 100644 --- a/src/RunStyles.cxx +++ b/src/RunStyles.cxx @@ -116,11 +116,11 @@ int RunStyles::EndRun(int position) { bool RunStyles::FillRange(int &position, int value, int &fillLength) { if (fillLength <= 0) { - throw std::invalid_argument("RunStyles::FillRange <= 0 length."); + return false; } int end = position + fillLength; if (end > Length()) { - throw std::invalid_argument("RunStyles::FillRange length goes past end."); + return false; } int runEnd = RunFromPosition(end); if (styles->ValueAt(runEnd) == value) { |