This post is a repost of [url]Exception try catch howto which has hasn’t gotten much attention. Maybe this one will.
When I run this…
/* test_exception.cpp */
#ifdef __CINT__
#include<exception>
int test_exception( void ){
try{
cout << endl << "throwing exception...";
throw exception();
}catch( exception const&e ){
cout << "caught!" << endl << e ;
}
return 0;
}
#endif
…I get this…
rubix@machine:~$ root -q -b -l test_exception.cpp
root [0]
Processing test_exception.cpp...
Warning in <TClass::TClass>: no dictionary for class exception is available
throwing exception...(int)-471556992
rubix@machine:~$
Anyone know what I’m doing wrong? How should exception throwing/catching be done to play nice with CINT?