1
0

exception.hh 383 B

12345678910111213141516171819
  1. #ifndef EXCEPTION_HH
  2. #define EXCEPTION_HH
  3. #include <exception>
  4. class errno_exception : public std::exception {
  5. public:
  6. explicit errno_exception(int err_no);
  7. int errno() const;
  8. virtual const char *what();
  9. private:
  10. int _errno;
  11. char _buf[1000];
  12. };
  13. int try_main(int (*main)(int argc, char** argv), int argc, char** argv,
  14. int ret_on_exception = 127);
  15. #endif