Hi
I want to add a simple exception handler to my boost.python application. I want it to print a simple message to the console, indicating the nature of the error.
I have seen:
try {
…
} catch ( error_already_set ) {
PyErr_Print();
}
But is there a better solution using a boost.python method instead of PyErr_Print() ?
Or, can I do something like the following?
catch ( const error_already_set& e ) {
cout << e.what();
}
Best regards
David