File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
include/osmium/index/detail Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -35,10 +35,10 @@ DEALINGS IN THE SOFTWARE.
3535
3636#include < cassert>
3737#include < cerrno>
38- #include < cstring>
3938#include < fcntl.h>
4039#include < stdexcept>
4140#include < string>
41+ #include < system_error>
4242#include < vector>
4343
4444namespace osmium {
@@ -56,7 +56,7 @@ namespace osmium {
5656 const std::string& filename = config[1 ];
5757 const int fd = ::open (filename.c_str (), O_CREAT | O_RDWR, 0644 ); // NOLINT(hicpp-signed-bitwise)
5858 if (fd == -1 ) {
59- throw std::runtime_error{ std::string{ " can't open file '" } + filename + " ': " + std::strerror (errno) };
59+ throw std::system_error{errno, std::system_category (), " can't open file '" + filename + " '" };
6060 }
6161 return new T{fd};
6262 }
You can’t perform that action at this time.
0 commit comments