MED fichier
med_err.h
Aller à la documentation de ce fichier.
1/* This file is part of MED.
2 *
3 * COPYRIGHT (C) 1999 - 2020 EDF R&D, CEA/DEN
4 * MED is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * MED is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with MED. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef MED_ERR
19#define MED_ERR
20
21
23#define MED_ERR_HOWTO -1
24#define MED_ERR_UNDEFINED -1
25
26/* Code d'erreur de catégorie */
27#define MED_ERR_CREATE -100
28#define MED_ERR_READ -200
29#define MED_ERR_WRITE -300
30#define MED_ERR_CLOSE -400
31#define MED_ERR_ACCESS -500
32#define MED_ERR_SELECT -600
33#define MED_ERR_INIT -700
34#define MED_ERR_RANGE -800
35#define MED_ERR_NULL -900
36#define MED_ERR_NOTNULL -1000
37#define MED_ERR_OPEN -1100
38#define MED_ERR_DOESNTEXIST -1200
39#define MED_ERR_UNRECOGNIZED -1300
40#define MED_ERR_INVALID -1400
41#define MED_ERR_DELETE -1500
42#define MED_ERR_NOTEQUAL -1600
43#define MED_ERR_EXIST -1700
44#define MED_ERR_MOUNT -1800
45#define MED_ERR_UMOUNT -1900
46#define MED_ERR_ULINK -2100
47#define MED_ERR_COUNT -2200
48#define MED_ERR_CALL -2300
49#define MED_ERR_VISIT -2400
50#define MED_ERR_COPY -2500
51#define MED_ERR_USE -2600
52
53#define MED_ERR_UNDEFINED_MSG "Erreur indéfinie "
54#define MED_ERR_CREATE_MSG "Erreur à la création "
55#define MED_ERR_READ_MSG "Erreur à la lecture "
56#define MED_ERR_WRITE_MSG "Erreur à l'écriture "
57#define MED_ERR_CLOSE_MSG "Erreur à la fermeture "
58#define MED_ERR_ACCESS_MSG "Erreur d'accès "
59#define MED_ERR_SELECT_MSG "Erreur de sélection "
60#define MED_ERR_INIT_MSG "Erreur d'initialisation "
61#define MED_ERR_RANGE_MSG "Erreur de domaine de définition "
62#define MED_ERR_NULL_MSG "Erreur de valeur attendue nulle "
63#define MED_ERR_NOTNULL_MSG "Erreur de valeur attendue non nulle "
64#define MED_ERR_OPEN_MSG "Erreur à l'ouverture "
65#define MED_ERR_DOESNTEXIST_MSG "Erreur de non existence "
66#define MED_ERR_UNRECOGNIZED_MSG "Erreur de valeur non reconnue "
67#define MED_ERR_INVALID_MSG "Erreur de valeur invalide "
68#define MED_ERR_DELETE_MSG "Erreur de suppression "
69#define MED_ERR_NOTEQUAL_MSG "Erreur d'égalité "
70#define MED_ERR_EXIST_MSG "Erreur d'existence "
71#define MED_ERR_MOUNT_MSG "Erreur au montage de l'objet "
72#define MED_ERR_UMOUNT_MSG "Erreur au démontage de l'objet "
73#define MED_ERR_ULINK_MSG "Erreur dans la destruction du lien "
74#define MED_ERR_COUNT_MSG "Erreur de comptage "
75#define MED_ERR_CALL_MSG "Erreur d'appel "
76#define MED_ERR_VISIT_MSG "Erreur d'exploration "
77#define MED_ERR_COPY_MSG "Erreur de copie "
78#define MED_ERR_USE_MSG "Erreur d'utilisation "
79
80
81/* Code d'erreur d'objet */
82#define MED_ERR_FILE -1
83#define MED_ERR_MESH -2
84#define MED_ERR_SUPPORT_MESH -3
85#define MED_ERR_ENTITY -4
86#define MED_ERR_STRUCT_ELEMENT -5
87#define MED_ERR_FAMILY -6
88#define MED_ERR_GROUP -7
89#define MED_ERR_LOCALIZATION -8
90#define MED_ERR_INTERPOLATION -9
91#define MED_ERR_FIELD -10
92#define MED_ERR_JOINT -11
93#define MED_ERR_FILTER -12
94#define MED_ERR_PROFILE -13
95#define MED_ERR_SCALAR -14
96#define MED_ERR_MEMSPACE -15
97#define MED_ERR_DISKSPACE -16
98#define MED_ERR_DATASET -17
99#define MED_ERR_DATAGROUP -18
100#define MED_ERR_ATTRIBUTE -19
101#define MED_ERR_PROPERTY -20
102#define MED_ERR_INTERLACINGMODE -21
103#define MED_ERR_PARAMETER -22
104#define MED_ERR_ACCESSMODE -23
105/* Deprecated : */
106#define MED_ERR_GEOMETRIC -24
107#define MED_ERR_GEOMETRY -24
108#define MED_ERR_DATASPACE -25
109#define MED_ERR_FILESPACE -26
110#define MED_ERR_LIBRARY -27
111#define MED_ERR_API -28
112#define MED_ERR_STORAGEMODE -29
113#define MED_ERR_COMPUTINGSTEP -30
114#define MED_ERR_HDFTYPE -31
115#define MED_ERR_LINK -32
116#define MED_ERR_DATATYPE -33
117#define MED_ERR_MEDDATATYPE -34
118#define MED_ERR_CONNECTIVITYMODE -35
119#define MED_ERR_GRIDTYPE -36
120#define MED_ERR_AXISTYPE -37
121#define MED_ERR_EQUIVALENCE -38
122#define MED_ERR_SUBDOMAINJOINT -39
123#define MED_ERR_STRUCT -40
124#define MED_ERR_INTERP -41
125#define MED_ERR_MESHTYPE -42
126#define MED_ERR_CORRESPONDENCE -43
127#define MED_ERR_DIMENSION -44
128#define MED_ERR_FILEVERSION -45
129#define MED_ERR_MEMFILE -46
130#define MED_ERR_CLASS -47
131
132#define MED_ERR_FILE_MSG "du fichier "
133#define MED_ERR_MESH_MSG "du maillage "
134#define MED_ERR_SUPPORT_MESH_MSG "du maillage support "
135#define MED_ERR_ENTITY_MSG "de l'entité "
136#define MED_ERR_STRUCT_ELEMENT_MSG "de l'élément de structure "
137#define MED_ERR_FAMILY_MSG "de la famille "
138#define MED_ERR_GROUP_MSG "du groupe "
139#define MED_ERR_LOCALIZATION_MSG "de la localisation des points d'intégration "
140#define MED_ERR_INTERPOLATION_MSG "de la fonction d'interpolation "
141#define MED_ERR_FIELD_MSG "du champ résultat "
142#define MED_ERR_JOINT_MSG "du joint "
143#define MED_ERR_FILTER_MSG "du filtre "
144#define MED_ERR_PROFILE_MSG "du profil "
145#define MED_ERR_SCALAR_MSG "des valeurs scalaires "
146#define MED_ERR_LIBRARY_MSG "du numéro de version de la librairie "
147#define MED_ERR_MEMSPACE_MSG "du memspace "
148#define MED_ERR_DISKSPACE_MSG "du dataspace "
149#define MED_ERR_DATASET_MSG "du dataset "
150#define MED_ERR_DATAGROUP_MSG "du groupe "
151#define MED_ERR_ATTRIBUTE_MSG "d'attribut "
152#define MED_ERR_PROPERTY_MSG "de propriété "
153#define MED_ERR_INTERLACINGMODE_MSG "d'entrelacement "
154#define MED_ERR_PARAMETER_MSG "du paramètre "
155#define MED_ERR_ACCESSMODE_MSG "du mode d'accès "
156 /* Deprecated : */
157#define MED_ERR_GEOMETRIC_MSG "du type géométrique "
158#define MED_ERR_GEOMETRY_MSG "du type géométrique "
159#define MED_ERR_DATASPACE_MSG "du dataspace "
160#define MED_ERR_FILESPACE_MSG "du filespace "
161#define MED_ERR_API_MSG "de l'API "
162#define MED_ERR_STORAGEMODE_MSG "de mode de stockage "
163#define MED_ERR_COMPUTINGSTEP_MSG "de l'étape de calcul "
164#define MED_ERR_HDFTYPE_MSG "du type hdf "
165#define MED_ERR_LINK_MSG "du lien "
166#define MED_ERR_DATATYPE_MSG "du datatype "
167#define MED_ERR_MEDDATATYPE_MSG "du datatatype med demandé "
168#define MED_ERR_CONNECTIVITYMODE_MSG "du mode de connectivité "
169#define MED_ERR_GRIDTYPE_MSG "du type de grille "
170#define MED_ERR_AXISTYPE_MSG "du type de repère "
171#define MED_ERR_EQUIVALENCE_MSG "de l'équivalence "
172#define MED_ERR_SUBDOMAINJOINT_MSG "de joint "
173#define MED_ERR_STRUCT_MSG "de l'élément de structure "
174#define MED_ERR_INTERP_MSG "de l'interpolation "
175#define MED_ERR_PARAM_MSG "du parametre "
176#define MED_ERR_MESHTYPE_MSG "du type de maillage"
177#define MED_ERR_CORRESPONDENCE_MSG "de la correspondance "
178#define MED_ERR_DIMENSION_MSG "de dimension"
179#define MED_ERR_FILEVERSION_MSG "de version de fichier"
180#define MED_ERR_MEMFILE_MSG "de fichier mémoire"
181#define MED_ERR_CLASS_MSG "du type d'objet MED"
182
183/*COMPLEMENTS*/
184#define MED_ERR_VALUE_MSG "de valeur "
185#define MED_ERR_SIZE_MSG "de taille "
186#define MED_ERR_GSIZE_MSG "de taille trop grande "
187#define MED_ERR_LSIZE_MSG "de taille trop petite "
188#define MED_ERR_ID_MSG "d'identifiant "
189#define MED_ERR_ARRAY_MSG "(tableau) "
190#define MED_ERR_MODE_MSG "en mode "
191#define MED_ERR_PARALLEL_MSG "en parallelisme "
192#define MED_ERR_ACCESS2_MSG "du mode d'accès "
193#define MED_ERR_FORBIDDEN_MSG "interdit(e) "
194#define MED_ERR_TYPEOF_MSG "de type "
195#define MED_ERR_NAME_MSG "de nom "
196#define MED_ERR_INTERNAL_MSG "interne "
197#define MED_ERR_NBR_MSG "nombre de "
198
199
200/* Pour générer la table :
201 for i in `grep 'MED_ERR_' med_err.h | grep -v 'MSG' | awk '{print $2}' `; do echo "{ $i , ${i}_MSG },"; done
202*/
203/* typedef struct _med_err_tab_entry { */
204/* int errno; */
205/* const char* const mesg; */
206/* } med_err_tab_entry; */
207
208/* med_err_tab_entry MED_TAB_ERR[]={ */
209/* { MED_ERR_UNDEFINED , MED_ERR_UNDEFINED_MSG }, */
210/* { MED_ERR_CREATE , MED_ERR_CREATE_MSG }, */
211/* { MED_ERR_READ , MED_ERR_READ_MSG }, */
212/* { MED_ERR_WRITE , MED_ERR_WRITE_MSG }, */
213/* { MED_ERR_CLOSE , MED_ERR_CLOSE_MSG }, */
214/* { MED_ERR_ACCESS , MED_ERR_ACCESS_MSG }, */
215/* { MED_ERR_SELECT , MED_ERR_SELECT_MSG }, */
216/* { MED_ERR_INIT , MED_ERR_INIT_MSG }, */
217/* { MED_ERR_FILE , MED_ERR_FILE_MSG }, */
218/* { MED_ERR_MESH , MED_ERR_MESH_MSG }, */
219/* { MED_ERR_SUPPORT_MESH , MED_ERR_SUPPORT_MESH_MSG }, */
220/* { MED_ERR_ENTITY , MED_ERR_ENTITY_MSG }, */
221/* { MED_ERR_STRUCT_ELEMENT , MED_ERR_STRUCT_ELEMENT_MSG }, */
222/* { MED_ERR_FAMILY , MED_ERR_FAMILY_MSG }, */
223/* { MED_ERR_GROUP , MED_ERR_GROUP_MSG }, */
224/* { MED_ERR_LOCALIZATION , MED_ERR_LOCALIZATION_MSG }, */
225/* { MED_ERR_INTERPOLATION , MED_ERR_INTERPOLATION_MSG }, */
226/* { MED_ERR_FIELD , MED_ERR_FIELD_MSG }, */
227/* { MED_ERR_JOINT , MED_ERR_JOINT_MSG }, */
228/* { MED_ERR_FILTER , MED_ERR_FILTER_MSG }, */
229/* { MED_ERR_PROFILE , MED_ERR_PROFILE_MSG }, */
230/* { MED_ERR_SCALAR , MED_ERR_SCALAR_MSG }, */
231/* { MED_ERR_MEMSPACE , MED_ERR_MEMSPACE_MSG }, */
232/* { MED_ERR_DISKSPACE , MED_ERR_DISKSPACE_MSG }, */
233/* { MED_ERR_DATASET , MED_ERR_DATASET_MSG }, */
234/* { MED_ERR_DATAGROUP , MED_ERR_DATAGROUP_MSG }, */
235/* { MED_ERR_ATTRIBUTE , MED_ERR_ATTRIBUTE_MSG } */
236/* } */
237
238#endif