I’m using 6.02/12. But I’m accessing the function through dictionaries generated with reflex on PyRoot. If you cannot reproduce this, tell me so that I’ll build a SSCCE.
As dominique correctly points out, the first release supporting exceptions in jitted code is 6.04.
The workaround suggested for 6.02 is to handle the exceptions directly in c++.
thanks for the information. However, the catch block that I’m using is on C++, if I understood correctly, then this this work on 6.02, right? What I believe that is happening is as soon PyRoot passes through one throw C++ code, it terminates the execution, even if I have a catch block as I showed here before…
Only if in C++ library compiled and linked with C++ compiler.
Compare:[code]$ root -b -q
| Welcome to ROOT 6.02/13 http://root.cern.ch |
| (c) 1995-2014, The ROOT Team |
| Built for linuxx8664gcc |
| From heads/v6-02-00-patches@v6-02-12-6-gc8c3a57, Jul 06 2015, 12:05:01 |
This should be analog to the second case, then? Should this work on 6.04 (although unfortunately I can’t change the ROOT version as it is defined by RootCore…)?
Thanks,
Werner.
[quote=“Dominique”]Only if in C++ library compiled and linked with C++ compiler.
Compare:[code]$ root -b -q
| Welcome to ROOT 6.02/13 http://root.cern.ch |
| (c) 1995-2014, The ROOT Team |
| Built for linuxx8664gcc |
| From heads/v6-02-00-patches@v6-02-12-6-gc8c3a57, Jul 06 2015, 12:05:01 |
Reflex is dead in R6, so don’t know what the above is. More likely autoloader brings in actual ‘func’. That would be first case, unless ‘func’ is defined in header (inline or template).
Indeed, it is a template. I’ve tried using cppyy.loadDict('RingerSelectorTools') and got the same result, so in fact the “_reflex” library was unnecessary.
I am glad you converged on a solution.
On the other hand if you are only interested to interactivity in PyROOT (i.e. no I/O), you do not even need dictionaries.
It is enough to load the shared library and inject the header in the interpreter.
For example:
MyClass.h