JayBeams  0.1
Another project to have fun coding.
os_error.cpp
Go to the documentation of this file.
1 #include "jb/detail/os_error.hpp"
2 
3 #include <system_error>
4 
5 void jb::detail::os_check_error(int r, char const* msg) {
6  if (r == 0) {
7  return;
8  }
9  throw std::system_error(r, std::system_category(), msg);
10 }
void os_check_error(int result, char const *msg)
Check the value of result and raise an exception if it is -1.
Definition: os_error.cpp:5