From fc5004a9e14cfd5c462abca0c8af3cab614aa48d Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 23 Apr 2026 10:42:27 +1000 Subject: Add error status SC_STATUS_OUTSIDE_DOCUMENT that is set when operations are attempted on a position outside the document. Positions are checked earlier to prevent actions partly succeeding. This is implemented with a new exception type Failure which should be caught by platform layer's API handling code to produce a more granular error status. --- win32/ScintillaWin.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'win32') diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 81101a261..856c66ca9 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -2500,6 +2500,8 @@ sptr_t ScintillaWin::WndProc(Message iMessage, uptr_t wParam, sptr_t lParam) { } } catch (std::bad_alloc &) { errorStatus = Status::BadAlloc; + } catch (Failure &failure) { + errorStatus = failure.status; } catch (...) { errorStatus = Status::Failure; } -- cgit v1.2.3