Exceptions in uncompiled scripts

I am using root 5.06/00 in win32 platform. I have a script with code that looks like: try { pc = (CCalibMass *)fCalib->Get("CCalibMass"); pb = (CBowl *)fCalib->Get("CBowl"); pv = (CVoltage *)fCalib->Get("CVoltage"); } catch (std::exception &e) { printf("Calibration version mis-match encountered %s - no action taken\n",e.what()); fclose(fp); delete pc; delete pb; delete pv; delete fCalib; return; } Where pc,pv and pb are classes that derive from TObject and their Streamer() methods throw exceptions if the version is unrecognized., e.g. if (R__v>Class_Version()) { char excBuffer[256]; sprintf(excBuffer,"CBowl Version: ROOT File=%d App=%d\n", R__v, Class_Version()); throw exception(excBuffer); } When one of my classes throws an exception, I get the following:[ul]Error: Symbol G__exception is not defined in current scope FILE:c:\root\macros\t0fixer.cpp LINE:357
Error: type G__exception not defined FILE:c:\root\macros\t0fixer.cpp LINE:357
Error: Symbol e is not defined in current scope FILE:c:\root\macros\t0fixer.cpp LINE:361
Error: Failed to evaluate e.what()Possible candidates are…
filename line:size busy function type and name
*** Interpreter error recovered ***[/ul]Line 357 is the last line in the try clause and 361 is the printf() statement.

Meanwhile, when the same script is compiled, the exception handling works fine. Is there a work-around? The functionality in this script is required on machines w/out access to compiler. Thanks!

To solve the problem (assuming you built the cintdlls) simply do #include <exception>at the root/cint prompt or inside the interpreted scripts.

Cheers,
Philippe.

I added#include <exception> into my interpreted script and I get the the exact same error (with line number incremented by 1!) when executing the script

I don’t know what you mean by[quote]assuming you built the cintdlls)[/quote] - I suspect thats why I still have the problem. I do build root from sources using
./configure win32
make
make dist

Potential users of the script only have the components of root that make dist provides. I suppose this means it won’t work?

Thanks!
Ed

Ed,

After the make step, do
make cintdlls

Rene