1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2 * Copyright by The HDF Group. * 3 * Copyright by the Board of Trustees of the University of Illinois. * 4 * All rights reserved. * 5 * * 6 * This file is part of HDF. The full HDF copyright notice, including * 7 * terms governing use, modification, and redistribution, is contained in * 8 * the COPYING file, which can be found at the root of the source code * 9 * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/. * 10 * If you do not have access to either file, you may request a copy from * 11 * help@hdfgroup.org. * 12 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 13 14 /* $Id$ */ 15 16 /*+ herr.h 17 *** header file for using error routines 18 *** to be included by all ".c" files 19 + */ 20 21 #ifndef __HERR_H 22 #define __HERR_H 23 24 /* if these symbols are not provided by the compiler, we'll have to 25 fake them. These are used in HERROR for recording location of 26 error in code. */ 27 28 #ifndef __FILE__ 29 # define __FILE__ "File name not supported" 30 #endif 31 #ifndef __LINE__ 32 # define __LINE__ 0 33 #endif 34 35 /* HERROR macro, used to facilitate error reporting. Assumes that 36 there's a variable called FUNC which holds the function name. 37 Assume that func and file are both stored in static space, or at 38 least be not corrupted in the meanwhile. */ 39 40 #define HERROR(e) HEpush(e, FUNC, __FILE__, __LINE__) 41 42 /* HRETURN_ERROR macro, used to facilitate error reporting. Makes 43 same assumptions as HERROR. IN ADDITION, this macro causes 44 a return from the calling routine */ 45 46 #define HRETURN_ERROR(err, ret_val) {HERROR(err); return(ret_val);} 47 48 /* HCLOSE_RETURN_ERROR macro, used to facilitate error reporting. Makes 49 same assumptions as HRETURN_ERROR. IN ADDITION, this macro causes 50 the file specified by the id "fid" to be closed */ 51 52 #define HCLOSE_RETURN_ERROR(hfid, err, ret_val) {HERROR(err); Hclose(hfid); \ 53 return(ret_val);} 54 55 /* HGOTO_ERROR macro, used to facilitate error reporting. Makes 56 same assumptions as HERROR. IN ADDITION, this macro causes 57 a jump to the label 'done' which should be in every fucntion 58 Also there is an assumption of a variable 'ret_value' */ 59 60 #define HGOTO_ERROR(err, ret_val) {HERROR(err); ret_value = ret_val; \ 61 goto done;} 62 63 /* HGOTO_FAIL macro, used to facilitate error reporting. This one 64 is added in 2019 to tidy the code. It is similar to HGOTO_ERROR, 65 except it does not call HERROR. This is to preserve the exact 66 behavior as the original code. */ 67 68 #define HGOTO_FAIL(ret_val) {ret_value = ret_val; \ 69 goto done;} 70 71 /* HCLOSE_RETURN_ERROR macro, used to facilitate error reporting. Makes 72 same assumptions as HRETURN_ERROR. IN ADDITION, this macro causes 73 the file specified by the id "fid" to be closed 74 Also , this macro causes a jump to the label 'done' which should 75 be in every fucntion. There is an assumption of a variable 'ret_value' */ 76 77 #define HCLOSE_GOTO_ERROR(hfid, err, ret_val) {HERROR(err); Hclose(hfid); \ 78 ret_value = ret_val; goto done;} 79 80 /* HGOTO_DONE macro, used to facilitate the new error reporting model. 81 This macro is just a wrapper to set the return value and jump to the 'done' 82 label. Also assumption of a variable 'ret_value' */ 83 84 #define HGOTO_DONE(ret_val) {ret_value = ret_val; goto done;} 85 86 /* For further error reporting */ 87 #define HE_REPORT(msg) HEreport(msg) 88 #define HE_REPORT_RETURN(msg, ret_val) { HEreport(msg); return(ret_val); } 89 #define HE_CLOSE_REPORT_RETURN(hfid,msg, ret_val) { HEreport(msg); \ 90 Hclose(hfid); \ 91 return(ret_val);} 92 93 #define HE_REPORT_GOTO(msg, ret_val) { HEreport(msg); ret_value = ret_val; \ 94 goto done;} 95 #define HE_CLOSE_REPORT_GOTO(hfid,msg, ret_val) { HEreport(msg); \ 96 Hclose(hfid); \ 97 ret_value = ret_val; \ 98 goto done;} 99 100 101 /* always points to the next available slot; the last error record is in slot (top-1) */ 102 #if defined(H4_BUILT_AS_DYNAMIC_LIB) 103 # ifdef _H_ERR_MASTER_ 104 # if defined _WIN32 && defined hdf_shared_EXPORTS 105 __declspec(dllexport) 106 # endif 107 # else 108 HDFERRPUBLIC 109 # endif /* _H_ERR_MASTER_ */ 110 int32 error_top 111 # ifdef _H_ERR_MASTER_ 112 = 0 113 # endif /* _H_ERR_MASTER_ */ 114 ; 115 #else /* defined(H4_BUILT_AS_DYNAMIC_LIB) */ 116 # ifndef _H_ERR_MASTER_ 117 HDFERRPUBLIC 118 # endif /* _H_ERR_MASTER_ */ 119 int32 error_top 120 # ifdef _H_ERR_MASTER_ 121 = 0 122 # endif /* _H_ERR_MASTER_ */ 123 ; 124 #endif /* defined(H4_BUILT_AS_DYNAMIC_LIB) */ 125 126 /* Macro to wrap around calls to HEPclear, so it doesn't get called zillions of times */ 127 #define HEclear() {if(error_top!=0) HEPclear(); } 128 129 /* 130 ====================================================================== 131 Error codes 132 133 NOTE: Remember to update the error_messages[] structure in herr.c 134 whenever errors are added/deleted from this list. 135 ====================================================================== 136 */ 137 /* Declare an enumerated type which holds all the valid HDF error codes */ 138 typedef enum 139 { 140 DFE_NONE = 0, /* special zero, no error */ 141 /* Low-level I/O errors */ 142 DFE_FNF, /* File not found */ 143 DFE_DENIED, /* Access to file denied */ 144 DFE_ALROPEN, /* File already open */ 145 DFE_TOOMANY, /* Too Many AID's or files open */ 146 DFE_BADNAME, /* Bad file name on open */ 147 DFE_BADACC, /* Bad file access mode */ 148 DFE_BADOPEN, /* Other open error */ 149 DFE_NOTOPEN, /* File can't be closed 'cause it isn't open */ 150 DFE_CANTCLOSE, /* fclose wouldn't work! */ 151 DFE_READERROR, /* There was a read error */ 152 DFE_WRITEERROR, /* There was a write error */ 153 DFE_SEEKERROR, /* There was a seek error */ 154 DFE_RDONLY, /* The DF is read only */ 155 DFE_BADSEEK, /* Attempt to seek past end of element */ 156 DFE_INVFILE, /* File is neither hdf, cdf, netcdf */ 157 158 /* Low-level HDF I/O errors */ 159 DFE_PUTELEM, /* Hputelement failed in some way */ 160 DFE_GETELEM, /* Hgetelement failed in some way */ 161 DFE_CANTLINK, /* Can't initialize link information */ 162 DFE_CANTSYNC, /* Cannot syncronize memory with file */ 163 164 /* Old group interface errors */ 165 DFE_BADGROUP, /* Error from DFdiread in opening a group */ 166 DFE_GROUPSETUP, /* Error from DFdisetup in opening a group */ 167 DFE_PUTGROUP, /* Error when putting a tag/ref into a group */ 168 DFE_GROUPWRITE, /* Error when writing out a group */ 169 170 /* Internal HDF errors */ 171 DFE_DFNULL, /* DF is a null pointer */ 172 DFE_ILLTYPE, /* DF has an illegal type: internal error */ 173 DFE_BADDDLIST, /* The DD list is non-existent: internal error */ 174 DFE_NOTDFFILE, /* This is not a DF file and it is not 0 length */ 175 DFE_SEEDTWICE, /* The DD list already seeded: internal error */ 176 DFE_NOSUCHTAG, /* No such tag in the file: search failed */ 177 DFE_NOFREEDD, /* There are no free DD's left: internal error */ 178 DFE_BADTAG, /* illegal WILDCARD tag */ 179 DFE_BADREF, /* illegal WILDCARD reference # */ 180 DFE_NOMATCH, /* No (more) DDs which match specified tag/ref */ 181 DFE_NOTINSET, /* Warning: Set contained unknown tag: ignored */ 182 DFE_BADOFFSET, /* Illegal offset specified */ 183 DFE_CORRUPT, /* File is corrupted */ 184 DFE_NOREF, /* no more reference numbers are available */ 185 DFE_DUPDD, /* the new tag/ref is already used */ 186 DFE_CANTMOD, /* old element not exist, cannot modify */ 187 DFE_DIFFFILES, /* Attempt to merge objs in diff files */ 188 DFE_BADAID, /* Got a bogus aid */ 189 DFE_OPENAID, /* There are still active AIDs */ 190 DFE_CANTFLUSH, /* Can't flush DD back to file */ 191 DFE_CANTUPDATE, /* Cannot update the DD block */ 192 DFE_CANTHASH, /* Cannot add a DD to the hash table */ 193 DFE_CANTDELDD, /* Cannot delete a DD in the file */ 194 DFE_CANTDELHASH, /* Cannot delete a DD from the hash table */ 195 DFE_CANTACCESS, /* Cannot access specified tag/ref */ 196 DFE_CANTENDACCESS, /* Cannot end access to data element */ 197 DFE_TABLEFULL, /* Access table is full */ 198 DFE_NOTINTABLE, /* Cannot find element in table */ 199 200 /* Generic errors */ 201 DFE_UNSUPPORTED, /* Feature not currently supported */ 202 DFE_NOSPACE, /* Malloc failed */ 203 DFE_BADCALL, /* Calls in wrong order */ 204 DFE_BADPTR, /* NULL ptr argument */ 205 DFE_BADLEN, /* Invalid len specified */ 206 DFE_NOTENOUGH, /* space provided insufficient for size of data */ 207 DFE_NOVALS, /* Values not available */ 208 DFE_ARGS, /* bad arguments to routine */ 209 DFE_INTERNAL, /* serious internal error */ 210 DFE_NORESET, /* Too late to modify this value */ 211 DFE_EXCEEDMAX, /* Value exceeds max allowed */ 212 DFE_GENAPP, /* Generic application,level error */ 213 214 /* Generic interface errors */ 215 DFE_UNINIT, /* Interface was not initialized correctly */ 216 DFE_CANTINIT, /* Can't initialize an interface we depend on */ 217 DFE_CANTSHUTDOWN, /* Can't shut down an interface we depend on */ 218 219 /* General Dataset errors */ 220 DFE_BADDIM, /* negative or zero dimensions specified */ 221 DFE_BADFP, /* File contained an illegal floating point num */ 222 DFE_BADDATATYPE, /* unknown or unavailable data type specified */ 223 DFE_BADMCTYPE, /* unknown or unavailable machine type specified */ 224 DFE_BADNUMTYPE, /* unknown or unavailable number type specified */ 225 DFE_BADORDER, /* unknown or illegal array order specified */ 226 DFE_RANGE, /* improper range for attempted acess */ 227 DFE_BADCONV, /* Don't know how to convert data type */ 228 DFE_BADTYPE, /* Incompatible types specified */ 229 DFE_BADDIMNAME, /* Dimension name not valid or already taken */ 230 DFE_NOVGREP, /* No Vgroup representation for SDS and dim */ 231 232 /* Compression errors */ 233 DFE_BADSCHEME, /* Unknown compression scheme specified */ 234 DFE_BADMODEL, /* Invalid compression model specified */ 235 DFE_BADCODER, /* Invalid compression encoder specified */ 236 DFE_MODEL, /* Error in modeling layer of compression */ 237 DFE_CODER, /* Error in encoding layer of compression */ 238 DFE_CINIT, /* Error in encoding initialization */ 239 DFE_CDECODE, /* Error in decoding compressed data */ 240 DFE_CENCODE, /* Error in encoding compressed data */ 241 DFE_CTERM, /* Error in encoding termination */ 242 DFE_CSEEK, /* Error seekging in encoded dataset */ 243 DFE_MINIT, /* Error in modeling initialization */ 244 DFE_COMPINFO, /* Invalid compression header */ 245 DFE_CANTCOMP, /* Can't compress an object */ 246 DFE_CANTDECOMP, /* Can't de-compress an object */ 247 DFE_NOENCODER, /* Encoder not available */ 248 DFE_NOSZLIB, /* SZIP library not available */ 249 DFE_COMPVERSION, /* Z_VERSION_ERROR (-6) returned from zlib */ 250 DFE_READCOMP, /* Error in reading compressed data; this 251 error occurs when one of the following 252 error codes is returned from zlib: 253 Z_ERRNO (-1) 254 Z_STREAM_ERROR (-2) 255 Z_DATA_ERROR (-3) 256 Z_MEM_ERROR (-4) 257 Z_BUF_ERROR (-5) */ 258 259 /* Raster errors */ 260 DFE_NODIM, /* No dimension record associated with image */ 261 DFE_BADRIG, /* Error processing a RIG */ 262 DFE_RINOTFOUND, /* Can't find raster image */ 263 DFE_BADATTR, /* Bad Attribute */ 264 DFE_LUTNOTFOUND, /* No palette information for RIG */ 265 DFE_GRNOTFOUND, /* Can't find specified GR */ 266 267 /* SDG/NDG errors */ 268 DFE_BADTABLE, /* the nsdg table is wrong */ 269 DFE_BADSDG, /* error processing an sdg */ 270 DFE_BADNDG, /* error processing an ndg */ 271 272 /* Vset errors */ 273 DFE_VGSIZE, /* Too many elements in VGroup */ 274 DFE_VTAB, /* Elmt not in vtab[] */ 275 DFE_CANTADDELEM, /* Cannot add tag/ref to VGroup */ 276 DFE_BADVGNAME, /* Cannot set VGroup name */ 277 DFE_BADVGCLASS, /* Cannot set VGroup class */ 278 279 /* Vdata errors */ 280 DFE_BADFIELDS, /* Bad fields string passed to Vset routine */ 281 DFE_NOVS, /* Counldn't find VS in file */ 282 DFE_SYMSIZE, /* Too many symbols in users table */ 283 DFE_BADATTACH, /* Cannot write to a previously attached VData */ 284 DFE_BADVSNAME, /* Cannot set VData name */ 285 DFE_BADVSCLASS, /* Cannot set VData class */ 286 DFE_VSWRITE, /* Error writing to VData */ 287 DFE_VSREAD, /* Error reading from VData */ 288 DFE_BADVH, /* Error in VData Header */ 289 DFE_FIELDSSET, /* Fields already set for vdata */ 290 291 /* High-level Vdata/Vset errors */ 292 DFE_VSCANTCREATE, /* Cannot create VData */ 293 DFE_VGCANTCREATE, /* Cannot create VGroup */ 294 295 /* Generic Vdata/Vset errors */ 296 DFE_CANTATTACH, /* Cannot attach to a VData/Vset */ 297 DFE_CANTDETACH, /* Cannot detach a VData/Vset with access 'w' */ 298 299 /* XDR level errors */ 300 DFE_XDRERROR, /* Error occur in XDR and/or CDF level */ 301 302 /* bit I/O errors */ 303 DFE_BITREAD, /* There was a bit-read error */ 304 DFE_BITWRITE, /* There was a bit-write error */ 305 DFE_BITSEEK, /* There was a bit-seek error */ 306 307 /* tbbt interface errors */ 308 DFE_TBBTINS, /* Failed to insert element into tree */ 309 310 /* bit-vector interface errors */ 311 DFE_BVNEW, /* Failed to create a bit-vector */ 312 DFE_BVSET, /* Failed when setting a bit in a bit-vector */ 313 DFE_BVGET, /* Failed when getting a bit in a bit-vector */ 314 DFE_BVFIND, /* Failed when finding a bit in a bit-vector */ 315 316 /* General to all interfaces */ 317 DFE_CANTSETATTR, /* Failed to add an attribute */ 318 DFE_CANTGETATTR, /* Failed to find or get an attribute */ 319 320 /* Annotation interface errors */ 321 DFE_ANAPIERROR /* Failed in annotation interface */ 322 } 323 hdf_err_code_t; 324 325 #ifdef _H_ERR_MASTER_ 326 327 /* error_messages is the list of error messages in the system, kept as 328 error_code-message pairs. To look up a message, a linear search is 329 required but efficiency should be okay. */ 330 331 typedef struct error_messages_t 332 { 333 hdf_err_code_t error_code; 334 const char *str; 335 } 336 error_messages_t; 337 338 PRIVATE const struct error_messages_t error_messages[] = 339 { 340 {DFE_NONE, "No error"}, 341 /* Low-level I/O errors */ 342 {DFE_FNF, "File not found"}, 343 {DFE_DENIED, "Access to file denied"}, 344 {DFE_ALROPEN, "File already open"}, 345 {DFE_TOOMANY, "Too Many AID's or files open"}, 346 {DFE_BADNAME, "Bad file name on open"}, 347 {DFE_BADACC, "Bad file access mode"}, 348 {DFE_BADOPEN, "Error opening file"}, 349 {DFE_NOTOPEN, "File can't be closed; It isn't open"}, 350 {DFE_CANTCLOSE, "Unable to close file"}, 351 {DFE_READERROR, "Read error"}, 352 {DFE_WRITEERROR, "Write error"}, 353 {DFE_SEEKERROR, "Error performing seek operation"}, 354 {DFE_RDONLY, "Attempt to write to read-only HDF file"}, 355 {DFE_BADSEEK, "Attempt to seek past end of element"}, 356 {DFE_INVFILE, "File is supported, must be either hdf, cdf, netcdf"}, 357 358 /* Low-level HDF I/O errors */ 359 {DFE_PUTELEM, "Hputelement failed in some way"}, 360 {DFE_GETELEM, "Hgetelement failed in some way"}, 361 {DFE_CANTLINK, "Can't initialize link information"}, 362 {DFE_CANTSYNC, "Cannot syncronize memory with file"}, 363 364 /* Old group interface errors */ 365 {DFE_BADGROUP, "Error from DFdiread in opening a group"}, 366 {DFE_GROUPSETUP, "Error from DFdisetup in opening a group"}, 367 {DFE_PUTGROUP, "Error when putting a tag/ref into a group"}, 368 {DFE_GROUPWRITE, "Error when writing out a group"}, 369 370 /* Internal HDF errors */ 371 {DFE_DFNULL, "DF has a null pointer"}, 372 {DFE_ILLTYPE, "Internal error: DF has an illegal type"}, 373 {DFE_BADDDLIST, "Internal error: The DD list is non-existent"}, 374 {DFE_NOTDFFILE, "This is not an HDF file"}, 375 {DFE_SEEDTWICE, "Internal error: The DD list is already seeded"}, 376 {DFE_NOSUCHTAG, "No such tag in the file: search failed"}, 377 {DFE_NOFREEDD, "There are no free DD's left"}, 378 {DFE_BADTAG, "Illegal WILDCARD tag"}, 379 {DFE_BADREF, "Illegal WILDCARD reference"}, 380 {DFE_NOMATCH, "No (more) DDs which match specified tag/ref"}, 381 {DFE_NOTINSET, "Set contained unknown tag: ignored"}, 382 {DFE_BADOFFSET, "Illegal offset specified"}, 383 {DFE_CORRUPT, "File is corrupted"}, 384 {DFE_NOREF, "No more reference numbers are available"}, 385 {DFE_DUPDD, "Tag/ref is already used"}, 386 {DFE_CANTMOD, "Old element does not exist, cannot modify"}, 387 {DFE_DIFFFILES, "Attempt to merge objects in different files"}, 388 {DFE_BADAID, "Unable to create a new AID"}, 389 {DFE_OPENAID, "There are still active AIDs"}, 390 {DFE_CANTFLUSH, "Cannot flush the changed DD back to the file"}, 391 {DFE_CANTUPDATE, "Cannot update the DD block"}, 392 {DFE_CANTHASH, "Cannot add a DD to the hash table"}, 393 {DFE_CANTDELDD, "Cannot delete a DD in the file"}, 394 {DFE_CANTDELHASH, "Cannot delete a DD from the hash table"}, 395 {DFE_CANTACCESS, "Cannot access specified tag/ref"}, 396 {DFE_CANTENDACCESS, "Cannot end access to data element"}, 397 {DFE_TABLEFULL, "Access table is full"}, 398 {DFE_NOTINTABLE, "Cannot find element in table"}, 399 400 /* Generic errors */ 401 {DFE_UNSUPPORTED, "Feature not currently supported"}, 402 {DFE_NOSPACE, "Internal error: Out of space"}, 403 {DFE_BADCALL, "Calls in wrong order"}, 404 {DFE_BADPTR, "NULL ptr argument"}, 405 {DFE_BADLEN, "Invalid length specified"}, 406 {DFE_NOTENOUGH, "Space provided insufficient for size of data"}, 407 {DFE_NOVALS, "Values not available"}, 408 {DFE_ARGS, "Invalid arguments to routine"}, 409 {DFE_INTERNAL, "HDF Internal error"}, 410 {DFE_NORESET, "Can not reset this value"}, 411 {DFE_EXCEEDMAX, "Value exceeds max allowed"}, 412 {DFE_GENAPP, "Generic application-level error"}, 413 414 /* Generic interface errors */ 415 {DFE_UNINIT, "Interface was not initialized correctly"}, 416 {DFE_CANTINIT, "Can't initialize an interface we depend on"}, 417 {DFE_CANTSHUTDOWN, "Can't shut down an interface we depend on"}, 418 419 /* Dataset errors */ 420 {DFE_BADDIM, "Negative or zero dimensions specified"}, 421 {DFE_BADFP, "File contained an illegal floating point number"}, 422 {DFE_BADDATATYPE, "Unknown or unavailable data type specified"}, 423 {DFE_BADMCTYPE, "Unknown or unavailable machine type specified"}, 424 {DFE_BADNUMTYPE, "Unknown or unavailable number type specified"}, 425 {DFE_BADORDER, "Unknown or illegal array order specified"}, 426 {DFE_RANGE, "Improper range for attempted access"}, 427 {DFE_BADCONV, "Don't know how to convert data type"}, 428 {DFE_BADTYPE, "Incompatible type specified"}, 429 {DFE_BADDIMNAME, "Dimension name not valid or already taken"}, 430 {DFE_NOVGREP, "No Vgroup representation for SDS and dim"}, 431 432 /* Compression errors */ 433 {DFE_BADSCHEME, "Unknown compression scheme specified"}, 434 {DFE_BADMODEL, "Invalid compression model specified"}, 435 {DFE_BADCODER, "Invalid compression coder specified"}, 436 {DFE_MODEL, "Error in modeling layer of compression"}, 437 {DFE_CODER, "Error in encoding layer of compression"}, 438 {DFE_CINIT, "Error in encoding initialization"}, 439 {DFE_CDECODE, "Error in decoding compressed data"}, 440 {DFE_CENCODE, "Error in encoding compressed data"}, 441 {DFE_CTERM, "Error in encoding termination"}, 442 {DFE_CSEEK, "Error seeking in encoded dataset"}, 443 {DFE_MINIT, "Error in modeling initialization"}, 444 {DFE_COMPINFO, "Invalid compression header"}, 445 {DFE_CANTCOMP, "Can't compress an object"}, 446 {DFE_CANTDECOMP, "Can't de-compress an object"}, 447 {DFE_NOENCODER, "Encoder not available"}, 448 {DFE_NOSZLIB, "SZIP library not available"}, 449 {DFE_COMPVERSION, "Z_VERSION_ERROR (-6) returned from zlib"}, 450 {DFE_READCOMP, "Error in reading compressed data"}, 451 452 /* Raster errors */ 453 {DFE_NODIM, "No dimension record associated with image or data set"}, 454 {DFE_BADRIG, "Error processing a RIG"}, 455 {DFE_RINOTFOUND, "Can't find raster image"}, 456 {DFE_BADATTR, "Bad Attribute"}, 457 {DFE_LUTNOTFOUND, "No palette information for RIG"}, 458 {DFE_GRNOTFOUND, "Can't find specified GR"}, 459 460 /* SDG/NDG errors */ 461 {DFE_BADTABLE, "The nsdg table is wrong"}, 462 {DFE_BADSDG, "Error processing an sdg"}, 463 {DFE_BADNDG, "Error processing an ndg"}, 464 465 /* Vset errors */ 466 {DFE_VGSIZE, "No more elements will fit in this VGroup"}, 467 {DFE_VTAB, "Element is not in VSet tables"}, 468 {DFE_CANTADDELEM, "Cannot add tag/ref to VGroup"}, 469 {DFE_BADVGNAME, "Cannot set VGroup name"}, 470 {DFE_BADVGCLASS, "Cannot set VGroup class"}, 471 472 /* Vdata errors */ 473 {DFE_BADFIELDS, "Unable to parse fields string correctly"}, 474 {DFE_NOVS, "Could not find specified VS or VG in file"}, 475 {DFE_SYMSIZE, "Too many symbols in table"}, 476 {DFE_BADATTACH, "Cannot write to a previously attached VData"}, 477 {DFE_BADVSNAME, "Cannot set VData name"}, 478 {DFE_BADVSCLASS, "Cannot set VData class"}, 479 {DFE_VSWRITE, "Error writing to VData"}, 480 {DFE_VSREAD, "Error reading from VData"}, 481 {DFE_BADVH, "Error in VData Header"}, 482 {DFE_FIELDSSET, "Fields already set for vdata"}, 483 484 /* High-level Vdata/Vset errors */ 485 {DFE_VSCANTCREATE, "Cannot create VData"}, 486 {DFE_VGCANTCREATE, "Cannot create VGroup"}, 487 488 /* Generic Vdata/Vset errors */ 489 {DFE_CANTATTACH, "Cannot attach to a VData"}, 490 {DFE_CANTDETACH, "Cannot detach a VData with access 'w'"}, 491 492 /* XDR level errors */ 493 {DFE_XDRERROR, "Error from XDR and/or CDF level"}, 494 495 /* bit I/O errors */ 496 {DFE_BITREAD, "There was a bit-read error"}, 497 {DFE_BITWRITE, "There was a bit-write error"}, 498 {DFE_BITSEEK, "There was a bit-seek error"}, 499 500 /* tbbt interface errors */ 501 {DFE_TBBTINS, "Failed to insert element into tree"}, 502 503 /* bit-vector interface errors */ 504 {DFE_BVNEW, "Failed to create a bit-vector"}, 505 {DFE_BVSET, "Failed when setting a bit in a bit-vector"}, 506 {DFE_BVGET, "Failed when getting a bit in a bit-vector"}, 507 {DFE_BVFIND, "Failed when finding a bit in a bit-vector"}, 508 509 /* General to all interfaces */ 510 {DFE_CANTSETATTR, "Cannot set an attribute"}, 511 {DFE_CANTGETATTR, "Cannot find or get an attribute"}, 512 513 /* Annotation interface errors */ 514 {DFE_ANAPIERROR, "Failed in annotation interface"} 515 516 }; 517 #endif /* _H_ERR_MASTER_ */ 518 519 #endif /* __HERR_H */ 520