We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de3dc48 commit 8b2d081Copy full SHA for 8b2d081
1 file changed
test/common/test-common.h
@@ -8,7 +8,9 @@
8
#include "hipfile.h"
9
#include "magic-word.h"
10
11
+#include <cerrno>
12
#include <cstdint>
13
+#include <cstring>
14
#include <iostream>
15
#include <random>
16
#include <stdexcept>
@@ -73,8 +75,10 @@ struct Tmpfile {
73
75
74
76
path += "/hipFile.XXXXXX";
77
if ((fd = mkstemp(path.data())) == -1) {
78
+ int mkstemp_err{errno};
79
umask(old_umask);
- throw std::runtime_error("Could not create temporary file");
80
+ throw std::runtime_error("Could not create temporary file " + path + ": " +
81
+ std::string(std::strerror(mkstemp_err)));
82
}
83
84
0 commit comments