|
Last change
on this file since 02bc3c was 79290f, checked in by Frederik Heber <heber@…>, 17 years ago |
|
config.h is included in each and every file. After trying to compile on JUMP (with xlc).
|
-
Property mode
set to
100644
|
|
File size:
1.4 KB
|
| Rev | Line | |
|---|
| [a0bcf1] | 1 | #ifndef errors_h
|
|---|
| 2 | #define errors_h
|
|---|
| 3 |
|
|---|
| 4 | /** \file errors.h
|
|---|
| 5 | * Header file for \ref errors.c
|
|---|
| 6 | *
|
|---|
| 7 | * Contains declarations of the functions implemented in \ref errors.c and
|
|---|
| 8 | * the enumeration of the error class Errors.
|
|---|
| 9 | *
|
|---|
| 10 | Project: ParallelCarParrinello
|
|---|
| 11 | Jan Hamaekers
|
|---|
| 12 | 2000
|
|---|
| 13 |
|
|---|
| 14 | File: errors.h
|
|---|
| 15 | $Id: errors.h,v 1.7 2006/03/30 22:19:52 foo Exp $
|
|---|
| 16 | */
|
|---|
| 17 |
|
|---|
| [79290f] | 18 | #ifdef HAVE_CONFIG_H
|
|---|
| 19 | #include <config.h>
|
|---|
| 20 | #endif
|
|---|
| 21 |
|
|---|
| [e6a122] | 22 | // taken out of TREMOLO
|
|---|
| 23 | /*@-namechecks@*/
|
|---|
| 24 | #ifndef __GNUC__
|
|---|
| 25 | # undef __attribute__
|
|---|
| 26 | # define __attribute__(x)
|
|---|
| 27 | #endif
|
|---|
| 28 | /*@=namechecks@*/
|
|---|
| [a0bcf1] | 29 |
|
|---|
| 30 | /* Verschiedene Fehlertypen */
|
|---|
| 31 | enum Errors { SomeError, //!< some unclassified error
|
|---|
| 32 | FileOpenParams, //!< Error opening parameter file
|
|---|
| 33 | InitReading, //!< Error parsing parameter file
|
|---|
| 34 | MallocError //!< Error while allocating memory
|
|---|
| 35 | };
|
|---|
| 36 | /* SomeError: Falls man noch zu faul ist */
|
|---|
| 37 |
|
|---|
| [e6a122] | 38 |
|
|---|
| [a0bcf1] | 39 | /* Behandelt aufgetretene Fehler. error ist der Fehlertyp(enum Errors)
|
|---|
| 40 | void *SpecialData ist ein untypisierter Zeiger auf Spezielle Daten zur Fehlerbehandlung.
|
|---|
| 41 | Man koennte auch noch einen Zeiger auf eine Funktion uebergeben */
|
|---|
| [e6a122] | 42 | extern void /*@exits@*/ Error(enum Errors error, /*@null@*/ const void *SpecialData)
|
|---|
| 43 | __attribute__ ((__noreturn__));
|
|---|
| 44 | #define Error(err, data) Error_in((err), (data), __FILE__, __LINE__)
|
|---|
| 45 |
|
|---|
| 46 | extern void /*@exits@*/ Error_in(enum Errors error, /*@null@*/ const void *SpecialData,
|
|---|
| 47 | const char *file, const int line)
|
|---|
| 48 | __attribute__ ((__noreturn__));
|
|---|
| [a0bcf1] | 49 |
|
|---|
| 50 | #endif
|
|---|
| 51 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.