Skip to content

Commit e08be4b

Browse files
committed
pr feedback
1 parent 62c7756 commit e08be4b

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

Core/include/Acts/EventData/SpacePointColumnProxy2.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ class SpacePointColumnProxy {
6363
/// @throws std::out_of_range if the index is out of range.
6464
Reference at(Index index) const {
6565
if (index >= column().size()) {
66-
throw std::out_of_range("Index out of range");
66+
throw std::out_of_range("Index out of range in SpacePointContainer2: " +
67+
std::to_string(index) +
68+
" >= " + std::to_string(size()));
6769
}
6870
return data()[index];
6971
}
@@ -80,6 +82,8 @@ class SpacePointColumnProxy {
8082
Container *m_container{};
8183
Column *m_column{};
8284

85+
std::uint32_t size() const noexcept { return column().size(); }
86+
8387
Column &column() const noexcept
8488
requires(!ReadOnly)
8589
{

Core/include/Acts/EventData/SpacePointContainer2.ipp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,18 @@ SpacePointContainer2::createSpacePoint() noexcept {
2727

2828
inline MutableSpacePointProxy2 SpacePointContainer2::at(Index index) {
2929
if (index >= size()) {
30-
throw std::out_of_range("Index out of range in SpacePointContainer2");
30+
throw std::out_of_range(
31+
"Index out of range in SpacePointContainer2: " + std::to_string(index) +
32+
" >= " + std::to_string(size()));
3133
}
3234
return MutableProxy(*this, index);
3335
}
3436

3537
inline ConstSpacePointProxy2 SpacePointContainer2::at(Index index) const {
3638
if (index >= size()) {
37-
throw std::out_of_range("Index out of range in SpacePointContainer2");
39+
throw std::out_of_range(
40+
"Index out of range in SpacePointContainer2: " + std::to_string(index) +
41+
" >= " + std::to_string(size()));
3842
}
3943
return ConstProxy(*this, index);
4044
}

0 commit comments

Comments
 (0)