v86 / tests /kvm-unit-tests /api /exception.hh
peterpeter8585's picture
Upload 553 files
8df6da4 verified
#ifndef EXCEPTION_HH
#define EXCEPTION_HH
#include <exception>
class errno_exception : public std::exception {
public:
explicit errno_exception(int err_no);
int errno() const;
virtual const char *what();
private:
int _errno;
char _buf[1000];
};
int try_main(int (*main)(int argc, char** argv), int argc, char** argv,
int ret_on_exception = 127);
#endif