Making some Runtime progress (#557)

This commit is contained in:
mrshigure 2025-02-04 17:54:29 -08:00 committed by GitHub
parent c15173cc66
commit d340ccf061
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 1537 additions and 24 deletions

View file

@ -0,0 +1,38 @@
#ifndef _EXCEPTION
#define _EXCEPTION
namespace std {
class exception {
public:
exception() { }
virtual ~exception() { }
virtual const char* what() const { return "exception"; }
};
class bad_exception : public exception {
public:
bad_exception() { }
virtual ~bad_exception() { }
virtual const char* what() const { return "bad_exception"; }
};
typedef void (*unexpected_handler)();
unexpected_handler set_unexpected(unexpected_handler handler);
void unexpected();
typedef void (*terminate_handler)();
terminate_handler set_terminate(terminate_handler handler);
void terminate();
} // namespace std
using std::bad_exception;
using std::exception;
using std::set_terminate;
using std::set_unexpected;
using std::terminate;
using std::terminate_handler;
using std::unexpected;
using std::unexpected_handler;
#endif