aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Document.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-05-28 14:46:21 +1000
committerNeil <nyamatongwe@gmail.com>2021-05-28 14:46:21 +1000
commitc9b2423aaed459c68dd8f43b1de0edee4eb287c8 (patch)
treef9bfdfa908e5a0a242fb2a00f1ed988682f568c5 /src/Document.h
parenta20684909b6edadae8e0c8c9ebc0d15d7fc128ba (diff)
downloadscintilla-mirror-c9b2423aaed459c68dd8f43b1de0edee4eb287c8.tar.gz
Better exception handling for noexcept methods. More accurate noexcept marking.
Diffstat (limited to 'src/Document.h')
-rw-r--r--src/Document.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Document.h b/src/Document.h
index 5c9840463..09d5841ed 100644
--- a/src/Document.h
+++ b/src/Document.h
@@ -489,7 +489,7 @@ public:
void EOLAnnotationClearAll();
bool AddWatcher(DocWatcher *watcher, void *userData);
- bool RemoveWatcher(DocWatcher *watcher, void *userData);
+ bool RemoveWatcher(DocWatcher *watcher, void *userData) noexcept;
CharacterClass WordCharacterClass(unsigned int ch) const;
bool IsWordPartSeparator(unsigned int ch) const;
@@ -525,6 +525,9 @@ public:
UndoGroup &operator=(UndoGroup &&) = delete;
~UndoGroup() {
if (groupNeeded) {
+ // EndUndoAction can throw as it allocates but throw in destructor is fatal.
+ // To fix this UndoHistory should allocate any memory needed by EndUndoAction
+ // beforehand or change EndUndoAction to not require allocation.
pdoc->EndUndoAction();
}
}