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!