ROOT
Version v6.32
master
v6.34
v6.30
v6.28
v6.26
v6.24
v6.22
v6.20
v6.18
v6.16
v6.14
v6.12
v6.10
v6.08
v6.06
Reference Guide
▼
ROOT
ROOT Reference Documentation
Tutorials
►
Functional Parts
►
Namespaces
►
All Classes
▼
Files
▼
File List
▼
bindings
▼
pyroot
▼
cppyy
►
cppyy
►
cppyy-backend
▼
CPyCppyy
►
include
▼
src
►
API.cxx
CallContext.cxx
►
CallContext.h
►
Converters.cxx
►
Converters.h
CPPClassMethod.cxx
►
CPPClassMethod.h
CPPConstructor.cxx
►
CPPConstructor.h
►
CPPDataMember.cxx
►
CPPDataMember.h
►
CPPEnum.cxx
►
CPPEnum.h
►
CPPExcInstance.cxx
►
CPPExcInstance.h
CPPFunction.cxx
►
CPPFunction.h
►
CPPGetSetItem.cxx
►
CPPGetSetItem.h
►
CPPInstance.cxx
►
CPPInstance.h
►
CPPMethod.cxx
►
CPPMethod.h
CPPOperator.cxx
►
CPPOperator.h
►
CPPOverload.cxx
►
CPPOverload.h
►
CPPScope.cxx
►
CPPScope.h
►
Cppyy.h
►
CPyCppyy.h
►
CPyCppyyModule.cxx
►
CustomPyTypes.cxx
►
CustomPyTypes.h
►
DeclareConverters.h
►
DeclareExecutors.h
►
Dimensions.h
►
Dispatcher.cxx
►
Dispatcher.h
►
DispatchPtr.cxx
►
Executors.cxx
►
Executors.h
►
LowLevelViews.cxx
►
LowLevelViews.h
►
MemoryRegulator.cxx
►
MemoryRegulator.h
►
ProxyWrappers.cxx
►
ProxyWrappers.h
►
PyCallable.h
►
PyException.cxx
PyObjectDir27.inc
►
PyResult.cxx
►
PyStrings.cxx
►
PyStrings.h
►
Pythonize.cxx
►
Pythonize.h
►
SignalTryCatch.h
►
TemplateProxy.cxx
►
TemplateProxy.h
►
TPyArg.cxx
TPyClassGenerator.cxx
TPyClassGenerator.h
►
TupleOfInstances.cxx
►
TupleOfInstances.h
►
TypeManip.cxx
►
TypeManip.h
►
Utility.cxx
►
Utility.h
►
pythonizations
►
r
►
tpython
►
core
►
documentation
►
geom
►
graf2d
►
graf3d
►
gui
►
hist
►
html
►
io
►
main
►
math
►
montecarlo
►
net
►
proof
►
roofit
►
sql
►
tmva
►
tree
►
tutorials
►
v6-32-00-patches
►
File Members
Release Notes
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
SignalTryCatch.h
Go to the documentation of this file.
1
// Partial reproduction of ROOT's TException.h
2
3
/*************************************************************************
4
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
5
* All rights reserved. *
6
* *
7
* For the licensing terms see $ROOTSYS/LICENSE. *
8
* For the list of contributors see $ROOTSYS/README/CREDITS. *
9
*************************************************************************/
10
11
#ifndef CPYCPPYY_SIGNALTRYCATCH_H
12
#define CPYCPPYY_SIGNALTRYCATCH_H
13
14
#include <setjmp.h>
15
#include "
CPyCppyy/CommonDefs.h
"
16
17
#ifndef _WIN32
18
#define NEED_SIGJMP 1
19
#endif
20
21
// By default, the ExceptionContext_t class is expected in the namespace
22
// CppyyLegacy, If it is expected in no namespace, one can explicitly define
23
// NO_CPPYY_LEGACY_NAMESPACE at build time (e.g. if one wants to use ROOT).
24
25
#ifndef NO_CPPYY_LEGACY_NAMESPACE
26
namespace
CppyyLegacy
{
27
#endif
28
struct
ExceptionContext_t
{
29
#ifdef NEED_SIGJMP
30
sigjmp_buf
fBuf
;
31
#else
32
jmp_buf
fBuf
;
33
#endif
34
};
35
#ifndef NO_CPPYY_LEGACY_NAMESPACE
36
}
37
38
using
CppyyExceptionContext_t
=
CppyyLegacy::ExceptionContext_t
;
39
#else
40
using
CppyyExceptionContext_t
=
ExceptionContext_t
;
41
#endif
42
43
#ifdef NEED_SIGJMP
44
# define CLING_EXCEPTION_SETJMP(buf) sigsetjmp(buf,1)
45
#else
46
# define CLING_EXCEPTION_SETJMP(buf) setjmp(buf)
47
#endif
48
49
#define CLING_EXCEPTION_RETRY \
50
{ \
51
static CppyyExceptionContext_t R__curr, *R__old = gException; \
52
int R__code; \
53
gException = &R__curr; \
54
R__code = CLING_EXCEPTION_SETJMP(gException->fBuf); if (R__code) { }; {
55
56
#define CLING_EXCEPTION_TRY \
57
{ \
58
static CppyyExceptionContext_t R__curr, *R__old = gException; \
59
int R__code; \
60
gException = &R__curr; \
61
if ((R__code = CLING_EXCEPTION_SETJMP(gException->fBuf)) == 0) {
62
63
#define CLING_EXCEPTION_CATCH(n) \
64
gException = R__old; \
65
} else { \
66
int n = R__code; \
67
gException = R__old;
68
69
#define CLING_EXCEPTION_ENDTRY \
70
} \
71
gException = R__old; \
72
}
73
74
CPYCPPYY_IMPORT
CppyyExceptionContext_t
*
gException
;
75
76
#endif
gException
CPYCPPYY_IMPORT CppyyExceptionContext_t * gException
Definition
SignalTryCatch.h:74
CommonDefs.h
CPYCPPYY_IMPORT
#define CPYCPPYY_IMPORT
Definition
CommonDefs.h:26
CppyyLegacy
Definition
SignalTryCatch.h:26
CppyyLegacy::ExceptionContext_t
Definition
SignalTryCatch.h:28
CppyyLegacy::ExceptionContext_t::fBuf
sigjmp_buf fBuf
Definition
SignalTryCatch.h:30
ExceptionContext_t
Definition
TException.h:30
bindings
pyroot
cppyy
CPyCppyy
src
SignalTryCatch.h
ROOT v6-32 - Reference Guide Generated on Tue Apr 1 2025 15:09:28 (GVA Time) using Doxygen 1.10.0