summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2025-11-19 22:30:25 +0200
committerDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2025-11-19 22:42:59 +0200
commitcab41e250d2cde922fe573fb6e4e918174681855 (patch)
treee9d3b942c6ef8d1e96078f490ffc443f0bae7dad
parent43b6e051944ea06a107f7ba972820b2d45cb11a2 (diff)
mu-server: improve error message for temp-file
Make it clear what exactly could not be created.
-rw-r--r--lib/mu-server.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/mu-server.cc b/lib/mu-server.cc
index 9aae7cf..35d38b3 100644
--- a/lib/mu-server.cc
+++ b/lib/mu-server.cc
@@ -65,7 +65,8 @@ struct OutputStream {
mu_format("mu-{}.eld", g_get_monotonic_time()))},
out_{std::ofstream{fname_}} {
if (!out().good())
- throw Mu::Error{Error::Code::File, "failed to create temp-file"};
+ throw Mu::Error{Error::Code::File,
+ "failed to create temp-file '{}'", fname_};
}
/**
* Construct an OutputStream for a stringstream