home *** CD-ROM | disk | FTP | other *** search
- // LISTING 5
-
- #include <stdlib.h>
- #include "ExH.h"
-
- // Static members instantiation
-
- PFV ExH::terminate = abort;
- PFV ExH::unexpected = ExH::terminate;
-
- char ExH::safeSpace[ExH::BUFSIZE];
- Exception* ExH::lastEx = (Exception*)ExH::safeSpace;
- JmpStack ExH::stk;
-
- void terminate()
- {
- (ExH::terminate)();
- }
-
- void unexpected()
- {
- (ExH::unexpected)();
- }
-
- PFV set_terminate(PFV t)
- {
- PFV ret = ExH::terminate;
- ExH::terminate = t;
- return ret;
- }
-
- PFV set_unexpected(PFV t)
- {
- PFV ret = ExH::unexpected;
- ExH::unexpected = t;
- return ret;
- }
-