mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
42 lines
1.5 KiB
C
42 lines
1.5 KiB
C
/*********************************************************************
|
|
* Copyright 1993, UCAR/Unidata
|
|
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
|
|
* $Header: /upc/share/CVS/netcdf-3/libncdap3/ncdaperr.c,v 1.10 2009/09/23 22:26:08 dmh Exp $
|
|
*********************************************************************/
|
|
|
|
#include "ncdap3.h"
|
|
|
|
NCerror
|
|
ocerrtoncerr(OCerror ocerr)
|
|
{
|
|
if(ocerr >= 0) return ocerr; /* really a system error*/
|
|
switch (ocerr) {
|
|
case OC_NOERR: return NC_NOERR;
|
|
case OC_EBADID: return NC_EBADID;
|
|
case OC_ECHAR: return NC_ECHAR;
|
|
case OC_EDIMSIZE: return NC_EDIMSIZE;
|
|
case OC_EEDGE: return NC_EEDGE;
|
|
case OC_EINVAL: return NC_EINVAL;
|
|
case OC_EINVALCOORDS: return NC_EINVALCOORDS;
|
|
case OC_ENOMEM: return NC_ENOMEM;
|
|
case OC_ENOTVAR: return NC_ENOTVAR;
|
|
case OC_EPERM: return NC_EPERM;
|
|
case OC_ESTRIDE: return NC_ESTRIDE;
|
|
case OC_EDAP: return NC_EDAP;
|
|
case OC_EXDR: return NC_EDAP;
|
|
case OC_ECURL: return NC_EIO;
|
|
case OC_EBADURL: return NC_EDAPURL;
|
|
case OC_EBADVAR: return NC_EDAP;
|
|
case OC_EOPEN: return NC_EIO;
|
|
case OC_EIO: return NC_EIO;
|
|
case OC_ENODATA: return NC_ENODATA;
|
|
case OC_EDAPSVC: return NC_EDAPSVC;
|
|
case OC_ENAMEINUSE: return NC_ENAMEINUSE;
|
|
case OC_EDAS: return NC_EDAS;
|
|
case OC_EDDS: return NC_EDDS;
|
|
case OC_EDATADDS: return NC_EDATADDS;
|
|
default: break;
|
|
}
|
|
return NC_EDAP; /* default;*/
|
|
}
|