File indexing completed on 2025-01-31 02:19:34
0001 #include "FWCore/Utilities/interface/compactStringSerializer.h"
0002 #include "FWCore/Utilities/interface/Exception.h"
0003
0004 namespace edm::compactString::detail {
0005 void throwIfContainsDelimiters(std::string const& str) {
0006 auto pos = str.find_first_of(kDelimiters);
0007 if (pos != std::string::npos) {
0008 cms::Exception ex("compactString");
0009 ex << "Serialized string '" << str << "' contains ";
0010 if (str[pos] == kContainerDelimiter) {
0011 ex << "container";
0012 } else {
0013 ex << "element";
0014 }
0015 ex << " delimiter at position " << pos;
0016 throw ex;
0017 }
0018 }
0019 }