|
Last change
on this file since 333 was 269, checked in by ansari, 27 years ago |
|
Persist<NDataBlock> Reza 27/04/99
|
|
File size:
464 bytes
|
| Rev | Line | |
|---|
| [242] | 1 | #include "pexceptions.h"
|
|---|
| 2 | #include <iostream.h>
|
|---|
| 3 |
|
|---|
| 4 | using namespace PlanckDPC;
|
|---|
| 5 |
|
|---|
| 6 | void PFailHandler(void);
|
|---|
| 7 |
|
|---|
| [269] | 8 | // egcs ne semble pas connaitre set_new_handler (Reza 26/04/99)
|
|---|
| 9 | #ifdef __GNUG__
|
|---|
| 10 | void PFailHandler(void) {}
|
|---|
| 11 | void InitFailNewHandler() {}
|
|---|
| 12 | #else
|
|---|
| 13 |
|
|---|
| [242] | 14 | void PFailHandler(void)
|
|---|
| 15 | {
|
|---|
| 16 | set_new_handler(NULL);
|
|---|
| 17 | cerr << "Allocation exception -- out of memory" << endl;
|
|---|
| 18 | throw(AllocationError("new"));
|
|---|
| 19 | }
|
|---|
| 20 |
|
|---|
| 21 | void InitFailNewHandler()
|
|---|
| 22 | {
|
|---|
| 23 | set_new_handler(PFailHandler);
|
|---|
| 24 | }
|
|---|
| 25 |
|
|---|
| [269] | 26 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.