cms-sw/cmssw — pull request #2372 by wmtan (2014-02-08 01:46:34+00:00)
Title: Propagate exceptions from TFile opening

This is a fix for numerous relval failures in the ROOT6 branch.
ROOT6 cannot propagate exceptions across the just-in-time interpreter, which is used every time cmsRun opens a TFile. This means that, if a file cannot be opened for any reason, our TFileAdaptor throws an exception, which JIT makes into a call to terminate(). This fix uses a thread local static std::exception_ptr to
store the exception instead of immediately throwing it. Then the caller of TFile::Open can check if there was an exception and rethrow it.
Attempts to open a TFile outside of cmsRun jobs do not have this problem, because they use the standard ROOT adaptor, which does not throw.
This request has been tested with the short relval matrix. There were no errors.
Please merge this in a timely manner.