Files
geant4/source/analysis/g4tools/include/tools/serrno
T
2017-12-08 12:52:30 +01:00

26 lines
425 B
Plaintext

// Copyright (C) 2010, Guy Barrand. All rights reserved.
// See the file tools.license for terms.
#ifndef tools_serrno
#define tools_serrno
#include <cerrno>
#include <cstring>
#include <sstream>
namespace tools {
inline void serrno(std::string& a_s) {
std::ostringstream strm;
strm << (int)errno;
a_s = " error : ";
a_s += strm.str();
a_s += " : ";
a_s += strerror(errno);
a_s += ".";
}
}
#endif