/***********************************************************************
* This file contains support for director classes that proxy
* method calls from C++ to Python extensions.
* Author : Mark Rose (mrose@stm.lbl.gov)
************************************************************************/
/* simple thread abstraction for pthreads on win32 */
bool Director::swig_up = false;
MUTEX_INIT(Director::swig_mutex_up);
pthread_t Director::swig_mutex_thread;
bool Director::swig_mutex_active = false;
void UnknownExceptionHandler::handler() {
} catch (DirectorException& e) {
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;
std::cerr << "Unknown exception caught." << std::endl;
<< "Python interpreter traceback:" << 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
<< "Exception is being re-thrown, program will like abort/terminate." << std::endl;