#include <config.h>#include <stdio.h>#include <stdarg.h>#include <stdlib.h>#include "netcdf.h"#include <string.h>Include dependency graph for error.c:

Go to the source code of this file.
Functions | |
| const char * | nc_strerror (int err) |
Variables | |
| static char | unknown [] = "Unknown Error" |
|
|
Definition at line 76 of file error.c. 00077 { 00078 00079 #ifdef vms 00080 if(err == EVMSERR) 00081 { 00082 return vms_strerror(err); 00083 } 00084 /* else */ 00085 #endif /* vms */ 00086 00087 if(NC_ISSYSERR(err)) 00088 { 00089 const char *cp = (const char *) strerror(err); 00090 if(cp == NULL) 00091 return unknown; 00092 /* else */ 00093 return cp; 00094 } 00095 /* else */ 00096 00097 switch (err) { 00098 case NC_NOERR: 00099 return "No error"; 00100 case NC_EBADID: 00101 return "Not a netCDF id"; 00102 case NC_ENFILE: 00103 return "Too many netCDF files open"; 00104 case NC_EEXIST: 00105 return "netCDF file exists && NC_NOCLOBBER"; 00106 case NC_EINVAL: 00107 return "Invalid argument"; 00108 case NC_EPERM: 00109 return "Write to read only"; 00110 case NC_ENOTINDEFINE: 00111 return "Operation not allowed in data mode"; 00112 case NC_EINDEFINE: 00113 return "Operation not allowed in define mode"; 00114 case NC_EINVALCOORDS: 00115 return "Index exceeds dimension bound"; 00116 case NC_EMAXDIMS: 00117 return "NC_MAX_DIMS exceeded"; 00118 case NC_ENAMEINUSE: 00119 return "String match to name in use"; 00120 case NC_ENOTATT: 00121 return "Attribute not found"; 00122 case NC_EMAXATTS: 00123 return "NC_MAX_ATTRS exceeded"; 00124 case NC_EBADTYPE: 00125 return "Not a netCDF data type or _FillValue type mismatch"; 00126 case NC_EBADDIM: 00127 return "Invalid dimension id or name"; 00128 case NC_EUNLIMPOS: 00129 return "NC_UNLIMITED in the wrong index"; 00130 case NC_EMAXVARS: 00131 return "NC_MAX_VARS exceeded"; 00132 case NC_ENOTVAR: 00133 return "Variable not found"; 00134 case NC_EGLOBAL: 00135 return "Action prohibited on NC_GLOBAL varid"; 00136 case NC_ENOTNC: 00137 return "Not a netCDF file"; 00138 case NC_ESTS: 00139 return "In Fortran, string too short"; 00140 case NC_EMAXNAME: 00141 return "NC_MAX_NAME exceeded"; 00142 case NC_EUNLIMIT: 00143 return "NC_UNLIMITED size already in use"; 00144 case NC_ENORECVARS: 00145 return "nc_rec op when there are no record vars"; 00146 case NC_ECHAR: 00147 return "Attempt to convert between text & numbers"; 00148 case NC_EEDGE: 00149 return "Start+count exceeds dimension bound"; 00150 case NC_ESTRIDE: 00151 return "Illegal stride"; 00152 case NC_EBADNAME: 00153 return "Attribute or variable name contains illegal characters"; 00154 case NC_ERANGE: 00155 return "Numeric conversion not representable"; 00156 case NC_ENOMEM: 00157 return "Memory allocation (malloc) failure"; 00158 case NC_EVARSIZE: 00159 return "One or more variable sizes violate format constraints"; 00160 case NC_EDIMSIZE: 00161 return "Invalid dimension size"; 00162 case NC_ETRUNC: 00163 return "File likely truncated or possibly corrupted"; 00164 } 00165 /* default */ 00166 return unknown; 00167 }
|
|
|
Definition at line 72 of file error.c. Referenced by nc_strerror(). |
1.4.4