#include "OdaCommon.h"
#include "OdResult.h"
#include "OdError.h"
Go to the source code of this file.
|
#define | OD_CHECK_THROW(CONDITION, RESULT_CODE, MESSAGE) |
|
#define | OD_CHECK_THROW_F(CONDITION, RESULT_CODE, ...) |
|
#define | OD_CHECKIN_THROW(CONDITION, MESSAGE) OD_CHECK_THROW (CONDITION, eInvalidInput, MESSAGE) |
|
#define | OD_CHECKIN_THROW_F(CONDITION, ...) OD_CHECK_THROW_F(CONDITION, eInvalidInput, __VA_ARGS__) |
|
#define | OD_CHECKGMF_THROW(CONDITION, MESSAGE) OD_CHECK_THROW (CONDITION, eGeneralModelingFailure, MESSAGE) |
|
#define | OD_CHECKGMF_THROW_F(CONDITION, ...) OD_CHECK_THROW_F(CONDITION, eGeneralModelingFailure, __VA_ARGS__) |
|
◆ OD_CHECK_THROW
#define OD_CHECK_THROW |
( |
|
CONDITION, |
|
|
|
RESULT_CODE, |
|
|
|
MESSAGE |
|
) |
| |
Value: if (CONDITION) {} \
FIRSTDLL_EXPORT OdError OdErrorByCodeAndMessage(OdResult iResCode, const char *iMessage)
Hard assert macro:
- The condition is evaluated and checked in any configuration.
- An OdError exception is thrown if condition fails.
- Custom message is inserted into OdError. Usage example: OD_CHECK_THROW(knots.size() >= 2*degree+2, eInvalidInput, "Nurbs curve has wrong number of knots");
Definition at line 48 of file Error_WithMessage.h.
◆ OD_CHECK_THROW_F
#define OD_CHECK_THROW_F |
( |
|
CONDITION, |
|
|
|
RESULT_CODE, |
|
|
|
... |
|
) |
| |
Value: if (CONDITION) {} \
FIRSTDLL_EXPORT OdError OdErrorByCodeAndMessageFormat(OdResult iResCode, const char *iMessageFormat,...)
Hard assert macro:
- The condition is evaluated and checked in any configuration.
- An OdError exception is thrown if condition fails.
- Custom formatted message is inserted into OdError. Usage example: OD_CHECK_THROW_F(knots.size() >= 2*degree+2, eInvalidInput, "Nurbs curve has only %d knots, need at least %d", knots.size(), 2*degree+2);
Definition at line 60 of file Error_WithMessage.h.
◆ OD_CHECKGMF_THROW
#define OD_CHECKGMF_THROW |
( |
|
CONDITION, |
|
|
|
MESSAGE |
|
) |
| OD_CHECK_THROW (CONDITION, eGeneralModelingFailure, MESSAGE) |
◆ OD_CHECKGMF_THROW_F
#define OD_CHECKGMF_THROW_F |
( |
|
CONDITION, |
|
|
|
... |
|
) |
| OD_CHECK_THROW_F(CONDITION, eGeneralModelingFailure, __VA_ARGS__) |
◆ OD_CHECKIN_THROW
#define OD_CHECKIN_THROW |
( |
|
CONDITION, |
|
|
|
MESSAGE |
|
) |
| OD_CHECK_THROW (CONDITION, eInvalidInput, MESSAGE) |
◆ OD_CHECKIN_THROW_F
#define OD_CHECKIN_THROW_F |
( |
|
CONDITION, |
|
|
|
... |
|
) |
| OD_CHECK_THROW_F(CONDITION, eInvalidInput, __VA_ARGS__) |
◆ OdErrorByCodeAndMessage()
◆ OdErrorByCodeAndMessageFormat()