lsst.pex.exceptions
8.0.0.0-23-g68b96ed
|
00001 // -*- lsst-c++ -*- 00002 /* 00003 * LSST Data Management System 00004 * Copyright 2008-2013 LSST Corporation. 00005 * 00006 * This product includes software developed by the 00007 * LSST Project (http://www.lsst.org/). 00008 * 00009 * This program is free software: you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation, either version 3 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the LSST License Statement and 00020 * the GNU General Public License along with this program. If not, 00021 * see <http://www.lsstcorp.org/LegalNotices/>. 00022 */ 00023 00024 #include "boost/format.hpp" 00025 00026 #include "lsst/pex/exceptions/Exception.h" 00027 00037 #define LSST_THROW_IF_NE(N1, N2, EXC_CLASS, MSG) \ 00038 if ((N1) != (N2)) throw LSST_EXCEPT(EXC_CLASS, (boost::format(MSG) % (N1) % (N2)).str())