File: handler_module.sip

package info (click to toggle)
sip6 6.15.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,888 kB
  • sloc: ansic: 192,450; python: 20,951; makefile: 25; cpp: 20
file content (26 lines) | stat: -rw-r--r-- 541 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// The SIP implementation of the handler_module test module.


%Module(name=imported_exceptions.handler_module)


%Exception std::exception(SIP_Exception) /PyName=StdException, Default/
{
%TypeHeaderCode
#include <exception>
%End

%RaiseCode
    const char *detail = sipExceptionRef.what();

    SIP_BLOCK_THREADS

#if SIP_ABI_MAJOR_VERSION >= 14
    PyErr_SetString((PyObject *)sipGetPyType(sipModule, sipTypeID_std_exception), detail);
#else
    PyErr_SetString(sipException_std_exception, detail);
#endif

    SIP_UNBLOCK_THREADS
%End
};