Last change
on this file since 441 was 269, checked in by ansari, 26 years ago |
Persist<NDataBlock> Reza 27/04/99
|
File size:
464 bytes
|
Line | |
---|
1 | #include "pexceptions.h"
|
---|
2 | #include <iostream.h>
|
---|
3 |
|
---|
4 | using namespace PlanckDPC;
|
---|
5 |
|
---|
6 | void PFailHandler(void);
|
---|
7 |
|
---|
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 |
|
---|
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 |
|
---|
26 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.