26 return std::format (
"`{}::{}' ({})",
41 return std::format (
"SG::ExcNoAuxStore: "
42 "Requested aux data item {} but there is no associated aux data store.",
50 return std::format (
"SG::ExcNoAuxStore: "
51 "Operation attempted on container with no associated aux data store: {}", op);;
81 return std::format (
"SG::ExcBadAuxVar: "
82 "Attempt to retrieve nonexistent aux data item {}.",
103 return std::format (
"SG::ExcConstAuxData: "
104 "Non-const operation `{}' performed on const aux data {}.",
128 (
"SG::ExcUntrackedSetStore: "
129 "Attempt to set aux data store on container that doesn't track indices, "
130 "or disable index tracking for a container with aux data.")
143 :
std::runtime_error (
"SG::ExcBadPrivateStore: "
144 "Bad use of private store: " + op)
154 const std::type_info& new_type,
155 const std::type_info& old_type,
156 const std::string& new_alloc_type,
157 const std::string& old_alloc_type)
160 std::format (
"SG::ExcAuxTypeMismatch: "
161 "Type mismatch for aux variable {}; old type is {} new type is {}",
163 AthContainers_detail::typeinfoName (old_type),
164 AthContainers_detail::typeinfoName (new_type));
165 if (old_alloc_type != new_alloc_type)
167 s += std::format (
". Old allocator type is {} new allocator type is {}",
168 old_alloc_type, new_alloc_type);
183 const std::type_info& new_type,
184 const std::type_info& old_type,
185 const std::string& new_alloc_type,
186 const std::string& old_alloc_type)
200 const std::type_info& base_type,
201 const std::type_info& complete_type)
203 return std::format (
"SG::ExcInsertionInBaseClass: "
204 "Attempted to do {} on a {} base class of {}; can only be done on the most-derived class.",
206 AthContainers_detail::typeinfoName (base_type),
207 AthContainers_detail::typeinfoName (complete_type));
219 const std::type_info& base_type,
220 const std::type_info& complete_type)
234 return std::format (
"SG::ExcStoreLocked: "
235 "Attempted to modify auxiliary data in a locked store: {}",
243 return std::format (
"SG::ExcStoreLocked: "
244 "Attempted to modify auxiliary data in a locked store: {}", op);
275 :
std::runtime_error (
"SG::ExcNonowningContainer: Attempted to insert a unique_ptr to a non-owning container.")
294 const std::string& clsname,
295 const std::type_info* typ)
297 std::string s = std::format (
"SG::ExcUnknownAuxItem: "
298 "Unknown aux data item {}{}{}",
299 clsname, (clsname.empty() ?
"" :
"::"), name);
301 s += std::format (
" (of type {})",
302 AthContainers_detail::typeinfoName (*typ));
314 const std::string& clsname ,
315 const std::type_info* typ )
328 const std::string& clsname ,
329 const std::type_info* typ )
341 return std::format (
"SG::ExcDVToELV: "
342 "Can't convert DataVector to vector of ElementLinks: {}",
364 :
std::runtime_error (
"ViewVector not in view mode.")
386 "was used in a context that requires a CLID, "
387 "but no CLID was available. Make sure a "
388 "VIEWVECTOR_CLASS_DEF declaration exists for the class "
389 "in a library that has been loaded.")
410 :
std::runtime_error (
"Missing BaseInfo for " +
432 :
std::runtime_error (
"Ownership mismatch for insertMove.")
446 if (flags & SG::AuxVarFlags::Linked) {
447 if (!out.empty()) out +=
" ";
451 return "[" + out +
"]";
457 const std::type_info&
type,
461 return std::format (
"SG::ExcFlagMismatch: "
462 "Flag mismatch for aux variable {} of type {} between existing {} and requested {} flags. "
463 "This may occur as a result of not using AtomicDecorator to access an atomic variable.",
465 AthContainers_detail::typeinfoName (
type),
479 const std::type_info&
type,
492 const std::type_info&
type,
496 return std::format (
"SG::ExcLinkMismatch: "
497 "Linked variable mismatch for aux variable {} of type {} between existing {} and requested {} linked variables.",
499 AthContainers_detail::typeinfoName (
type),
513 const std::type_info&
type,
517 existing_linked_id, requested_linked_id))
527 const std::type_info&
type)
529 return std::format (
"SG::ExcNoLinkedVar: "
530 "Linked variable not found for aux variable {} of type {}",
541 const std::type_info&
type)
552 const std::string& key)
554 return std::format (
"SG::ExcInvalidThinningTarget: "
555 "ThinningHandle target does not exist: {}/{}",
566 const std::string& key)
579 :
std::runtime_error (
"SG::ExcBadIterSwap: Attempt to swap between containers with inconsistent ownership.")
591 :
std::runtime_error (
"SG::ExcAllocOwnership: Bad allocation ownership.")
611 return std::format (
"SG::ExcBadVarName: "
612 "Bad name for auxiliary variable `{}'. "
613 "Variable and class names must consist of only digits, letters, "
614 "and underscores, and cannot start with a digit. "
615 "Variable names may not be empty, but class names may be.",
636 return "SG::ExcJaggedVecOverlappingCopy: Overlapping copies not implemented for jagged vectors. Talk to core software if this is an issue.";
Handle mappings between names and auxid_t.
Exceptions that can be thrown from AthContainers.
Handle mappings between names and auxid_t.
static AuxTypeRegistry & instance()
Return the singleton registry instance.
Exception — Bad allocation ownership.
ExcAllocOwnership()
Constructor.
ExcAuxTypeMismatch(SG::auxid_t auxid, const std::type_info &new_type, const std::type_info &old_type, const std::string &new_alloc_type, const std::string &old_alloc_type)
Constructor.
ExcBadAuxVar(SG::auxid_t auxid)
Constructor.
ExcBadIterSwap()
Constructor.
ExcBadPrivateStore(const std::string &op)
Constructor.
ExcBadVarName(const std::string &name)
Constructor.
ExcConstAuxData(const std::string &op, SG::auxid_t auxid=null_auxid)
Constructor.
ExcDVToELV(const std::string &detail)
Constructor.
ExcFlagMismatch(SG::auxid_t auxid, const std::type_info &type, SG::AuxVarFlags existing_flags, SG::AuxVarFlags requested_flags)
Constructor.
ExcInsertMoveOwnershipMismatch()
Constructor.
ExcInsertionInBaseClass(const char *op, const std::type_info &base_type, const std::type_info &complete_type)
Constructor.
ExcInvalidThinningTarget(unsigned int clid, const std::string &key)
Constructor.
Exception — Overlapping copies not implemented for jagged vectors.
ExcJaggedVecOverlappingCopy()
Constructor.
ExcLinkMismatch(SG::auxid_t auxid, const std::type_info &type, SG::auxid_t existing_linked_id, SG::auxid_t requested_linked_id)
Constructor.
Exception — Missing BaseInfo.
ExcMissingBaseInfo(const std::type_info &ti)
Constructor.
Exception — Missing CLID for ViewVector.
ExcMissingViewVectorCLID(const std::type_info &ti)
Constructor.
ExcNoAuxStore(SG::auxid_t auxid)
Constructor.
ExcNoLinkedVar(SG::auxid_t auxid, const std::type_info &type)
Constructor.
Exception — Attempted to insert a unique_ptr to a non-owning container.
ExcNonowningContainer()
Constructor.
ExcStoreLocked(SG::auxid_t auxid)
Constructor.
Exception — Unknown aux data item.
ExcUnknownAuxItem(const std::string &name, const std::string &clsname="", const std::type_info *typ=0)
Constructor.
ExcUntrackedSetStore()
Constructor.
Exception — ViewVector not in view mode.
ExcViewVectorNotView()
Constructor.
Helper for emitting error messages.
std::string excInvalidThinningTarget_format(unsigned int clid, const std::string &key)
Helper: format exception error string.
AuxVarFlags
Additional flags to qualify an auxiliary variable.
@ Atomic
Mark that this variable should only be accessed atomically.
std::string excDVToELV_format(const std::string &detail)
Helper: format exception error string.
void throwExcViewVectorNotView()
Throw a SG::ExcViewVectorNotView exception.
std::string excFormatFlags(SG::AuxVarFlags flags)
Helper: format flags.
static const auxid_t null_auxid
To signal no aux data item.
void throwExcAllocOwnership()
Throw a SG::ExcAllocOwnership exception.
std::string excBadVarName_format(const std::string &name)
Helper: format exception error string.
SG::auxid_t auxid() const
Return the aux id for this variable.
std::string excBadAuxVar_format(SG::auxid_t auxid)
Helper: format exception error string.
std::string excNoLinkedVar_format(SG::auxid_t auxid, const std::type_info &type)
Helper: format exception error string.
void throwJaggedVecOverlappingCopy()
Throw a SG::ExcJaggedVecOverlappingCopy exception.
std::string excJaggedVecOverlappingCopy_format()
Helper: format exception error string.
void throwExcMissingBaseInfo(const std::type_info &ti)
Throw a SG::ExcMissingBaseInfo exception.
std::string excStoreLocked_format(SG::auxid_t auxid)
Helper: format exception error string.
std::string excFlagMismatch_format(SG::auxid_t auxid, const std::type_info &type, SG::AuxVarFlags existing_flags, SG::AuxVarFlags requested_flags)
Helper: format exception error string.
std::string excNoAuxStore_format(SG::auxid_t auxid)
Helper: format exception error string.
void throwExcNonowningContainer()
Throw a SG::ExcNonowningContainer exception.
std::string excConstAuxData_format(const std::string &op, SG::auxid_t auxid)
Helper: format exception error string.
std::string excFormatName(SG::auxid_t auxid)
Helper: format an aux data item name.
std::string excLinkMismatch_format(SG::auxid_t auxid, const std::type_info &type, SG::auxid_t existing_linked_id, SG::auxid_t requested_linked_id)
Helper: format exception error string.
void throwExcUnknownAuxItem(const std::string &name, const std::string &clsname="", const std::type_info *typ=0)
Throw a SG::ExcUnknownAuxItem exception.
std::string excInsertionInBaseClass_format(const char *op, const std::type_info &base_type, const std::type_info &complete_type)
Helper: format exception error string.
std::string excAuxTypeMismatch_format(SG::auxid_t auxid, const std::type_info &new_type, const std::type_info &old_type, const std::string &new_alloc_type, const std::string &old_alloc_type)
Helper: format exception error string.
std::string excUnknownAuxItem_format(const std::string &name, const std::string &clsname, const std::type_info *typ)
Helper: format exception error string.
void throwExcMissingViewVectorCLID(const std::type_info &ti)
Throw a SG::ExcMissingViewVectorCLID exception.
size_t auxid_t
Identifier for a particular aux data item.