[1022] | 1 | /********************************************************************* |
---|
| 2 | * Copyright 1993, UCAR/Unidata |
---|
| 3 | * See netcdf/COPYRIGHT file for copying and redistribution conditions. |
---|
| 4 | * $Header: /upc/share/CVS/netcdf-3/libncdap3/ncdaperr.c,v 1.10 2009/09/23 22:26:08 dmh Exp $ |
---|
| 5 | *********************************************************************/ |
---|
| 6 | |
---|
| 7 | #include "ncdap3.h" |
---|
| 8 | |
---|
| 9 | NCerror |
---|
| 10 | ocerrtoncerr(OCerror ocerr) |
---|
| 11 | { |
---|
| 12 | if(ocerr >= 0) return ocerr; /* really a system error*/ |
---|
| 13 | switch (ocerr) { |
---|
| 14 | case OC_NOERR: return NC_NOERR; |
---|
| 15 | case OC_EBADID: return NC_EBADID; |
---|
| 16 | case OC_ECHAR: return NC_ECHAR; |
---|
| 17 | case OC_EDIMSIZE: return NC_EDIMSIZE; |
---|
| 18 | case OC_EEDGE: return NC_EEDGE; |
---|
| 19 | case OC_EINVAL: return NC_EINVAL; |
---|
| 20 | case OC_EINVALCOORDS: return NC_EINVALCOORDS; |
---|
| 21 | case OC_ENOMEM: return NC_ENOMEM; |
---|
| 22 | case OC_ENOTVAR: return NC_ENOTVAR; |
---|
| 23 | case OC_EPERM: return NC_EPERM; |
---|
| 24 | case OC_ESTRIDE: return NC_ESTRIDE; |
---|
| 25 | case OC_EDAP: return NC_EDAP; |
---|
| 26 | case OC_EXDR: return NC_EDAP; |
---|
| 27 | case OC_ECURL: return NC_EIO; |
---|
| 28 | case OC_EBADURL: return NC_EDAPURL; |
---|
| 29 | case OC_EBADVAR: return NC_EDAP; |
---|
| 30 | case OC_EOPEN: return NC_EIO; |
---|
| 31 | case OC_EIO: return NC_EIO; |
---|
| 32 | case OC_ENODATA: return NC_ENODATA; |
---|
| 33 | case OC_EDAPSVC: return NC_EDAPSVC; |
---|
| 34 | case OC_ENAMEINUSE: return NC_ENAMEINUSE; |
---|
| 35 | case OC_EDAS: return NC_EDAS; |
---|
| 36 | case OC_EDDS: return NC_EDDS; |
---|
| 37 | case OC_EDATADDS: return NC_EDATADDS; |
---|
| 38 | case OC_ERCFILE: return NC_EDAP; |
---|
| 39 | case OC_ENOFILE: return NC_ECANTREAD; |
---|
| 40 | default: break; |
---|
| 41 | } |
---|
| 42 | return NC_EDAP; /* default;*/ |
---|
| 43 | } |
---|