Commit 265ba2ac authored by Jan Oliver Oelerich's avatar Jan Oliver Oelerich

more verbose error message when failing to open binary file for writing

parent 215aa308
......@@ -922,7 +922,7 @@ void IO::writeTemporaryResult(unsigned int idefocus, unsigned int iconf,
// float[] cbed_intensities
if (tmpfile.fail()) {
output::error("Couldn't open temporary binary file for writing.\n");
output::error("Couldn't open temporary binary %s file for writing.\n", getTempFileName());
}
if(tmpfile.tellp() == 0) {
......
......@@ -124,14 +124,14 @@ namespace stemsalabim {
}
inline void error(const std::string &str) {
print("\n%s\n", " -- Error --\n");
std::cerr << "\n%s\n", " -- Error --\n";
std::cerr << str << "\n";
exit(1);
}
template<typename... ParamTypes>
void error(const std::string &str_format, ParamTypes... parameters) {
print("\n%s\n", " -- Error --\n");
std::cerr << "\n%s\n", " -- Error --\n";
tfm::format(std::cerr, str_format.c_str(), parameters...);
exit(1);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment