From e8a718e56ce89554c3d6dc7282969e05f69ce50d Mon Sep 17 00:00:00 2001 From: Ricardo Abreu Date: Thu, 14 Dec 2023 12:01:22 +0000 Subject: [PATCH] [daemon] Assert exception pertains to snapshots --- src/daemon/daemon.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/daemon/daemon.cpp b/src/daemon/daemon.cpp index af7d443d57..8dce0ffdeb 100644 --- a/src/daemon/daemon.cpp +++ b/src/daemon/daemon.cpp @@ -3467,8 +3467,9 @@ void mp::Daemon::populate_instance_info(VirtualMachine& vm, { instance_info->set_num_snapshots(vm.get_num_snapshots()); } - catch (const NotImplementedOnThisBackendException&) + catch (const NotImplementedOnThisBackendException& e) { + assert(std::string{e.what()}.find("snapshots") != std::string::npos); // TODO per-feature exception type instead } instance_info->set_image_release(original_release); instance_info->set_id(vm_image.id);