ATLAS Offline Software
Loading...
Searching...
No Matches
throw_out_of_range.cxx
Go to the documentation of this file.
1/*
2 * Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration.
3 */
10
11
13#include <format>
14#include <stdexcept>
15
16
17namespace CxxUtils {
18
19
27void throw_out_of_range (const std::string& what,
28 size_t index, size_t size, const void* obj)
29{
30 throw std::out_of_range (std::format
31 ("CxxUtils::throw_out_of_range {} requested index {} >= {} for object at {}",
32 what, index, size, obj));
33};
34
35
43void throw_out_of_range (const char* what,
44 size_t index, size_t size, const void* obj)
45{
46 throw_out_of_range (std::string(what), index, size, obj);
47}
48
49
50} // namespace CxxUtils
void throw_out_of_range(const std::string &what, size_t index, size_t size, const void *obj)
Throw an out_of_range exception.
Definition index.py:1
Helpers for throwing out_of_range exceptions.