From 36ae6ecca484a8b651a92525a6464329e6c7c130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Wed, 21 Feb 2024 17:48:42 +0100 Subject: [PATCH] Some exceptions for unimplemented stuff --- src/Series.cpp | 2 ++ src/snapshots/ContainerImpls.cpp | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/src/Series.cpp b/src/Series.cpp index f8728fff15..b5833aecda 100644 --- a/src/Series.cpp +++ b/src/Series.cpp @@ -2755,6 +2755,8 @@ Snapshots Series::snapshots() break; case Access::READ_WRITE: + throw std::runtime_error( + "[Series::snapshots()] Unimplemented for READ_WRITE mode."); case Access::CREATE: case Access::APPEND: // @todo: properly distinguish here diff --git a/src/snapshots/ContainerImpls.cpp b/src/snapshots/ContainerImpls.cpp index 7e625bd1a4..480c11b660 100644 --- a/src/snapshots/ContainerImpls.cpp +++ b/src/snapshots/ContainerImpls.cpp @@ -152,6 +152,12 @@ auto StatefulSnapshotsContainer::operator[](key_type const &key) auto access = s.series.IOHandler()->m_frontendAccess; // @todo distinguish read_write + if (access == Access::READ_WRITE) + { + throw std::runtime_error( + "[StatefulSnapshotsContainer::operator[]()] Unimplemented for " + "READ_WRITE mode."); + } if (access::write(access)) { auto lastIteration = base_iterator->peekCurrentlyOpenIteration();