Borderbasix

Error.H
Go to the documentation of this file.
1 /*********************************************************************
2 * This file is part of the source code of BORDERBASIX software. *
3 * (C) B. Mourrain, INRIA *
4 **********************************************************************
5 History:
6 $Id: Error.H,v 1.1.1.1 2006/10/06 08:01:40 trebuche Exp $
7 **********************************************************************/
8 //====================================================================
9 // Fichier d'entete contenant quelques fonctions utiles
10 #ifndef _Error_H_
11 #define _Error_H_
12 
13 
14 #include <stdio.h>
15 #include <stdarg.h>
16 #include <stream.h>
17 #include <fstream.h>
18 #include <cmath>
19 
20 // Messages d'erreurs
21 const char * ERR_SPACE = "\n NOT ENOUGH MEMORY ";
22 const char * ERR_RANGE = "\n INDEX OUT OF RANGE ";
23 const char * ERR_INIT = "\n INITIALIZATIONS NOT PERFECT ";
24 const char * ERR_OPEN_FILE = "\n IMPOSSIBLE TO OPEN FILE ";
25 const char * ERR_DIM = "\n Dimension check failure ";
26 const char * ERR_POSITIVE = "\n Exposant not positive ";
27 const char * ERR_FUNCTION = "Function: ";
28 const char * ERR_CONSTRUCTOR = "Constructor: ";
29 const char * ERR_OPERATOR = "Operator: ";
30 const char * ERR_METH = "Method: ";
31 const char * MFORMAT = "%G" ;
32 
33 
34 // Afficher les messages d'errreur
35 void Error(char *myformat,...)
36 {
37  va_list argPointer;
38  va_start(argPointer,myformat);
39  vfprintf(stderr,myformat,argPointer);
40  va_end(argPointer);
41  exit(1);
42 }
43 
44 #endif // _Error_H_
const char * ERR_RANGE
Definition: Error.H:22
const char * ERR_METH
Definition: Error.H:30
void Error(char *myformat,...)
Definition: Error.H:35
const char * ERR_DIM
Definition: Error.H:25
const char * ERR_SPACE
Definition: Error.H:21
const char * ERR_FUNCTION
Definition: Error.H:27
const char * ERR_POSITIVE
Definition: Error.H:26
const char * ERR_OPERATOR
Definition: Error.H:29
const char * MFORMAT
Definition: Error.H:31
const char * ERR_CONSTRUCTOR
Definition: Error.H:28
const char * ERR_OPEN_FILE
Definition: Error.H:24
const char * ERR_INIT
Definition: Error.H:23
Home  |  Download & InstallContributions