From 37f710d4eea40efa99d8c1973f69f0fcf3e07aec Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 3 May 2009 03:52:19 +0000 Subject: Turned on exceptions. Translate exceptions into status codes before leaving Scintilla. Pick up status codes in SciTE and throw a ScintillaFailure exception. SciTE on Windows catches ScintillaFailure, shows message and exits. --- include/Scintilla.h | 3 +++ include/Scintilla.iface | 5 +++++ 2 files changed, 8 insertions(+) (limited to 'include') diff --git a/include/Scintilla.h b/include/Scintilla.h index 3d61be26f..677cd0325 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -558,6 +558,9 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_GETMODEVENTMASK 2378 #define SCI_SETFOCUS 2380 #define SCI_GETFOCUS 2381 +#define SC_STATUS_OK 0 +#define SC_STATUS_FAILURE 1 +#define SC_STATUS_BADALLOC 2 #define SCI_SETSTATUS 2382 #define SCI_GETSTATUS 2383 #define SCI_SETMOUSEDOWNCAPTURES 2384 diff --git a/include/Scintilla.iface b/include/Scintilla.iface index 5860944de..a2c905fb7 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -1476,6 +1476,11 @@ set void SetFocus=2380(bool focus,) # Get internal focus flag. get bool GetFocus=2381(,) +enu Status=SC_STATUS_ +val SC_STATUS_OK=0 +val SC_STATUS_FAILURE=1 +val SC_STATUS_BADALLOC=2 + # Change error status - 0 = OK. set void SetStatus=2382(int statusCode,) # Get error status. -- cgit v1.2.3