LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Macros
asserts.h File Reference
#include "boost/format.hpp"
#include "lsst/pex/exceptions/Exception.h"

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())
 

Macro Definition Documentation

#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 with the given message (which must include two Boost.Format placeholders for the two numbers) if they are not.

For example:

* LSST_ASSERT_EQUAL(3, 4, "size of foo (%d) is not equal to size of bar (%d)", LengthError);
*

Definition at line 37 of file asserts.h.