Last change
on this file since 2458 was 2339, checked in by ansari, 23 years ago |
Compli avec SGI-CC -LANG:std et remplacement template <> pour SGI-CC par DECL_TEMP_SPEC - Reza 10/03/2003
|
File size:
760 bytes
|
Rev | Line | |
---|
[242] | 1 | #include "pexceptions.h"
|
---|
[2322] | 2 | #include <iostream>
|
---|
[1960] | 3 | #include <stdio.h>
|
---|
[242] | 4 |
|
---|
| 5 | void PFailHandler(void);
|
---|
| 6 |
|
---|
[269] | 7 | // egcs ne semble pas connaitre set_new_handler (Reza 26/04/99)
|
---|
[2339] | 8 | // ca ne passe plus avec SGI-CC -LANG:std $CHECK$ Reza 14/02/2003
|
---|
| 9 | #if defined( __GNUG__ ) || defined(__SGICC__)
|
---|
[269] | 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 | }
|
---|
[1959] | 25 | #endif
|
---|
[242] | 26 |
|
---|
[1958] | 27 | string SOPHYA::BuildLongExceptionMessage(const char * s, const char *file, int line)
|
---|
[773] | 28 | {
|
---|
| 29 | char buff[32];
|
---|
| 30 | sprintf(buff," Line=%d", line);
|
---|
| 31 | string rs=s;
|
---|
| 32 | rs += " File="; rs += file; rs += buff;
|
---|
| 33 | return(rs);
|
---|
| 34 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.