diff options
Diffstat (limited to 'lib/persistence.h')
-rw-r--r-- | lib/persistence.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/persistence.h b/lib/persistence.h index 86b0dce..e8e3415 100644 --- a/lib/persistence.h +++ b/lib/persistence.h @@ -303,6 +303,9 @@ namespace Persistence { if (auto teo = std::dynamic_pointer_cast<T>(sharedObjects.at(id))) { this->v = std::move(teo); } + else { + throw std::runtime_error("Named type doesn't cast to target type"); + } } }; } |