[C++-sig] Catching a user defined C++ exception in python.

Paul F. Kunz Paul_Kunz at slac.stanford.edu
Sat May 22 01:54:42 CEST 2004


   Try ...

try :
    junk = Display ( "XY Plot", [ energy, sigma, errors ],
                     [ "Energy", "Sigma" ] )
except RuntimeError, detail :
    print detail

When run I get...

Display: Too few labels

where the C++ class under Display threw the C++ exception.




More information about the Cplusplus-sig mailing list