move unixDie() so it is generally available
parent
d1a5925af6
commit
71203b6bc8
|
@ -26,11 +26,6 @@ using namespace std;
|
|||
|
||||
extern const char* g_gitHash;
|
||||
|
||||
void unixDie(const std::string& str)
|
||||
{
|
||||
throw std::runtime_error(str+string(": ")+string(strerror(errno)));
|
||||
}
|
||||
|
||||
time_t parseTime(std::string_view in)
|
||||
{
|
||||
time_t now=time(0);
|
||||
|
|
|
@ -351,3 +351,8 @@ size_t writen2(int fd, const void *buf, size_t count)
|
|||
|
||||
return count;
|
||||
}
|
||||
|
||||
void unixDie(const std::string& reason)
|
||||
{
|
||||
throw std::runtime_error(reason+": "+strerror(errno));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue