2020-02-17 03:59:33 +08:00
|
|
|
/*********************************************************************
|
|
|
|
* Copyright 2018, UCAR/Unidata
|
|
|
|
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
|
|
|
|
*********************************************************************/
|
|
|
|
#ifndef NCH5DEBUG_H
|
|
|
|
#define NCH5DEBUG_H
|
|
|
|
|
|
|
|
/* Warning: significant performance impact */
|
|
|
|
#undef H5CATCH
|
|
|
|
|
2021-09-03 07:04:26 +08:00
|
|
|
#undef H5BACKTRACE
|
|
|
|
|
2020-02-17 03:59:33 +08:00
|
|
|
#ifdef H5CATCH
|
|
|
|
/* Place breakpoint to catch errors close to where they occur*/
|
2021-12-24 13:18:56 +08:00
|
|
|
#define THROW(e) nch5throw(e,__LINE__)
|
2020-02-17 03:59:33 +08:00
|
|
|
#define THROWCHK(e) (void)nch5throw(e)
|
|
|
|
extern int nch5breakpoint(int err);
|
2021-12-24 13:18:56 +08:00
|
|
|
extern int nch5throw(int err, int line);
|
2020-02-17 03:59:33 +08:00
|
|
|
#else
|
|
|
|
#define THROW(e) (e)
|
|
|
|
#define THROWCHK(e)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /*NCH5DEBUG_H*/
|
|
|
|
|