mu-server: improve error message for temp-file

Make it clear what exactly could not be created.
This commit is contained in:
Dirk-Jan C. Binnema
2025-11-19 22:30:25 +02:00
committed by Seth Ladygo
parent 9b3e21081e
commit 804b1180fe

View File

@ -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