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. --- gtk/ScintillaGTK.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gtk') diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 686a8c13f..b8a7c354a 100755 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -947,6 +947,8 @@ sptr_t ScintillaGTK::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