nmealib 0.0.4
NMEA 0183/NMEA 2000 parsing library
Loading...
Searching...
No Matches
errorSupport.h
Go to the documentation of this file.
1#pragma once
2
3#if defined(NMEALIB_NO_EXCEPTIONS)
4#define NMEALIB_RETURN_ERROR(exceptionExpr) \
5 do { \
6 (void)0; \
7 return nullptr; \
8 } while (0)
9
10#define NMEALIB_RETURN_ERROR_VALUE(exceptionExpr, value) \
11 do { \
12 (void)0; \
13 return (value); \
14 } while (0)
15#else
16#define NMEALIB_RETURN_ERROR(exceptionExpr) throw (exceptionExpr)
17#define NMEALIB_RETURN_ERROR_VALUE(exceptionExpr, value) throw (exceptionExpr)
18#endif