LSSTApplications
18.1.0
LSSTDataManagementBasePackage
|
Go to the source code of this file.
Macros | |
#define | LSST_THROW_IF_NE(N1, N2, EXC_CLASS, MSG) if ((N1) != (N2)) throw LSST_EXCEPT(EXC_CLASS, (boost::format(MSG) % (N1) % (N2)).str()) |
Check whether the given values are equal, and throw an LSST Exception if they are not. More... | |
#define LSST_THROW_IF_NE | ( | N1, | |
N2, | |||
EXC_CLASS, | |||
MSG | |||
) | if ((N1) != (N2)) throw LSST_EXCEPT(EXC_CLASS, (boost::format(MSG) % (N1) % (N2)).str()) |
Check whether the given values are equal, and throw an LSST Exception if they are not.
The given message must include two Boost.Format placeholders for the two numbers.
For example:
LSST_THROW_IF_NE(3, 4, LengthError, "size of foo (%d) is not equal to size of bar (%d)");