add Scott's patches for directors: void return, directormap register, better error messages

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7324 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-07-06 21:02:22 +00:00
commit 83ef5241ee
3 changed files with 32 additions and 21 deletions

View file

@ -28,15 +28,23 @@ namespace Swig {
try {
throw;
} catch (DirectorException& e) {
std::cerr << "Swig Director exception caught: "<< e.getMessage() << std::endl;
std::cerr << "Swig Director exception caught:" << std::endl
<< e.getMessage() << std::endl;
} catch (std::exception& e) {
std::cerr << "std::exception caught: "<< e.what() << std::endl;
} catch (...) {
std::cerr << "Unknown exception caught." << std::endl;
}
std::cerr << "This exception was caught by the SWIG unexpected exception handler." << std::endl;
std::cerr << "Try using %feature(\"director:except\") to avoid reaching this point." << std::endl;
std::cerr << "Now your program will probably be terminated, bye." << std::endl;
std::cerr << std::endl
<< "Python interpreter traceback:" << std::endl;
PyErr_Print();
std::cerr << std::endl;
std::cerr << "This exception was caught by the SWIG unexpected exception handler." << std::endl
<< "Try using %feature(\"director:except\") to avoid reaching this point." << std::endl
<< std::endl
<< "Exception is being re-thrown, program will like abort/terminate." << std::endl;
throw;
}