Skip to content

Commit

Permalink
Merge pull request #3175 from canonical/fix-snapshots-error-msg
Browse files Browse the repository at this point in the history
[vm] Fix missing braces in error msg formatting
  • Loading branch information
sharder996 authored Jul 27, 2023
2 parents 38f90ee + 5ce1c41 commit d84e0ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/platform/backends/shared/base_virtual_machine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ std::shared_ptr<const Snapshot> BaseVirtualMachine::take_snapshot(const QDir& sn
assert_vm_stopped(state); // precondition

Check warning on line 207 in src/platform/backends/shared/base_virtual_machine.cpp

View check run for this annotation

Codecov / codecov/patch

src/platform/backends/shared/base_virtual_machine.cpp#L206-L207

Added lines #L206 - L207 were not covered by tests

if (snapshot_count > max_snapshots)
throw std::runtime_error{fmt::format("Maximum number of snapshots exceeded", max_snapshots)};
throw std::runtime_error{fmt::format("Maximum number of snapshots exceeded: {}", max_snapshots)};
snapshot_name = name.empty() ? generate_snapshot_name() : name;

Check warning on line 211 in src/platform/backends/shared/base_virtual_machine.cpp

View check run for this annotation

Codecov / codecov/patch

src/platform/backends/shared/base_virtual_machine.cpp#L209-L211

Added lines #L209 - L211 were not covered by tests

const auto [it, success] = snapshots.try_emplace(snapshot_name, nullptr);
Expand Down

0 comments on commit d84e0ed

Please sign in to comment.