Last change
on this file since 3385 was 2615, checked in by cmv, 21 years ago |
using namespace sophya enleve de machdefs.h, nouveau sopnamsp.h cmv 10/09/2004
|
File size:
782 bytes
|
Rev | Line | |
---|
[2615] | 1 | #include "sopnamsp.h"
|
---|
[242] | 2 | #include "pexceptions.h"
|
---|
[2322] | 3 | #include <iostream>
|
---|
[1960] | 4 | #include <stdio.h>
|
---|
[242] | 5 |
|
---|
| 6 | void PFailHandler(void);
|
---|
| 7 |
|
---|
[269] | 8 | // egcs ne semble pas connaitre set_new_handler (Reza 26/04/99)
|
---|
[2339] | 9 | // ca ne passe plus avec SGI-CC -LANG:std $CHECK$ Reza 14/02/2003
|
---|
| 10 | #if defined( __GNUG__ ) || defined(__SGICC__)
|
---|
[269] | 11 | void PFailHandler(void) {}
|
---|
| 12 | void InitFailNewHandler() {}
|
---|
| 13 | #else
|
---|
| 14 |
|
---|
[242] | 15 | void PFailHandler(void)
|
---|
| 16 | {
|
---|
| 17 | set_new_handler(NULL);
|
---|
| 18 | cerr << "Allocation exception -- out of memory" << endl;
|
---|
| 19 | throw(AllocationError("new"));
|
---|
| 20 | }
|
---|
| 21 |
|
---|
| 22 | void InitFailNewHandler()
|
---|
| 23 | {
|
---|
| 24 | set_new_handler(PFailHandler);
|
---|
| 25 | }
|
---|
[1959] | 26 | #endif
|
---|
[242] | 27 |
|
---|
[1958] | 28 | string SOPHYA::BuildLongExceptionMessage(const char * s, const char *file, int line)
|
---|
[773] | 29 | {
|
---|
| 30 | char buff[32];
|
---|
| 31 | sprintf(buff," Line=%d", line);
|
---|
| 32 | string rs=s;
|
---|
| 33 | rs += " File="; rs += file; rs += buff;
|
---|
| 34 | return(rs);
|
---|
| 35 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.