diff options
| author | Neil <nyamatongwe@gmail.com> | 2026-04-23 10:42:27 +1000 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2026-04-23 10:42:27 +1000 |
| commit | fc5004a9e14cfd5c462abca0c8af3cab614aa48d (patch) | |
| tree | 3ee485eec59e9f1547002a8b862c3d25b2a7e306 /src/CellBuffer.h | |
| parent | ff16983250f077aa2fa1ac1039ad421813fd20f0 (diff) | |
| download | scintilla-mirror-fc5004a9e14cfd5c462abca0c8af3cab614aa48d.tar.gz | |
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.
Diffstat (limited to 'src/CellBuffer.h')
| -rw-r--r-- | src/CellBuffer.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/CellBuffer.h b/src/CellBuffer.h index d54d2be8d..11479f14a 100644 --- a/src/CellBuffer.h +++ b/src/CellBuffer.h @@ -10,6 +10,11 @@ namespace Scintilla::Internal { +struct Failure : public std::runtime_error { + Status status; + Failure(Status status_) : std::runtime_error("failure with status"), status(status_) {} +}; + // Interface to per-line data that wants to see each line insertion and deletion class PerLine { public: |
