CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/DataFormats/Common/src/CommonExceptions.cc

Go to the documentation of this file.
00001 #include "DataFormats/Common/interface/CommonExceptions.h"
00002 #include "DataFormats/Provenance/interface/ProductID.h"
00003 #include "FWCore/Utilities/interface/EDMException.h"
00004 namespace edm {
00005   void
00006   checkForWrongProduct(ProductID const& keyID, ProductID const& refID) {
00007     if (keyID != refID) {
00008       throw Exception(errors::InvalidReference) <<
00009          "AssociationVector: trying to use [] operator passing a reference\n" <<
00010          " with the wrong product id (i.e.: pointing to the wrong collection)\n" <<
00011          " keyRef.id = " << keyID << ", ref.id = " << refID << "\n";
00012       
00013     }
00014   }
00015 }
00016