BLAssert.hh

Go to the documentation of this file.
00001 //      BLAssert.hh
00002 /*
00003 This source file is part of G4beamline, http://g4beamline.muonsinc.com
00004 Copyright (C) 2003,2004,2005,2006 by Tom Roberts, all rights reserved.
00005 
00006 This program is free software; you can redistribute it and/or
00007 modify it under the terms of the GNU General Public License
00008 as published by the Free Software Foundation; either version 2
00009 of the License, or (at your option) any later version.
00010 
00011 This program is distributed in the hope that it will be useful,
00012 but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 GNU General Public License for more details.
00015 
00016 http://www.gnu.org/copyleft/gpl.html
00017 */
00018 
00019 #ifndef BLASSERT_H
00020 #define BLASSERT_H
00021 
00022 /// Macro BLAssert() replaces the assert() macro with a G4Exception.
00023 #define BLAssert(EXPR) \
00024 ((EXPR) ? (void)0 : (G4Exception(__FILE__,"Assert Failure",FatalException,#EXPR), (void)0) )
00025 
00026 ///#define BLAssert(E) assert(E)
00027 
00028 #endif // BLASSERT_H
g4beamline