Skip to content

Commit

Permalink
Include prefix to error message regarding opening replica
Browse files Browse the repository at this point in the history
  • Loading branch information
djmitche committed Nov 28, 2024
1 parent 0b28646 commit 4d42973
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/TDB2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <Table.h>
#include <format.h>
#include <main.h>
#include <rust/cxx.h>
#include <shared.h>
#include <signal.h>
#include <stdlib.h>
Expand All @@ -51,7 +52,11 @@ static void dependency_scan(std::vector<Task>&);

////////////////////////////////////////////////////////////////////////////////
void TDB2::open_replica(const std::string& location, bool create_if_missing) {
_replica = tc::new_replica_on_disk(location, create_if_missing);
try {
_replica = tc::new_replica_on_disk(location, create_if_missing);
} catch (rust::Error& err) {
throw format("Could not open replica at {1}: {2}", location, err.what());
}
}

////////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 4d42973

Please sign in to comment.