source:
Sophya/trunk/SophyaLib/BaseTools/pexceptions.cc@
252
| Last change on this file since 252 was 242, checked in by , 27 years ago | |
|---|---|
| File size: 314 bytes | |
| Line | |
|---|---|
| 1 | #include "pexceptions.h" |
| 2 | #include <iostream.h> |
| 3 | |
| 4 | using namespace PlanckDPC; |
| 5 | |
| 6 | void PFailHandler(void); |
| 7 | |
| 8 | void PFailHandler(void) |
| 9 | { |
| 10 | set_new_handler(NULL); |
| 11 | cerr << "Allocation exception -- out of memory" << endl; |
| 12 | throw(AllocationError("new")); |
| 13 | } |
| 14 | |
| 15 | void InitFailNewHandler() |
| 16 | { |
| 17 | set_new_handler(PFailHandler); |
| 18 | } |
| 19 |
Note:
See TracBrowser
for help on using the repository browser.
![(please configure the [header_logo] section in trac.ini)](/PI/chrome/site/your_project_logo.png)