CMS 3D CMS Logo

throwMissingLabel.cc
Go to the documentation of this file.
2 
4 #include <iostream>
5 
6 namespace pat {
7  void throwMissingLabel(const std::string& what,
8  const std::string& bad_label,
9  const std::vector<std::string>& available) {
10  cms::Exception ex(std::string("Unknown") + what);
11  ex << "Requested " << what << " " << bad_label << " is not available! Possible " << what << "s are: " << std::endl;
12  for (const auto& name : available) {
13  ex << name << ' ';
14  }
15  throw ex;
16  }
17 } // namespace pat
pat::throwMissingLabel
void throwMissingLabel(const std::string &what, const std::string &bad_label, const std::vector< std::string > &available)
Definition: throwMissingLabel.cc:7
throwMissingLabel.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
pat
Definition: HeavyIon.h:7
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
Exception.h
cms::Exception
Definition: Exception.h:70