1 /* 2 * Copyright (C) 2009 Codership Oy <info@codership.com> 3 */ 4 5 /*! 6 * @file exception.hpp 7 * 8 * @brief GComm exception definitions. 9 */ 10 11 #ifndef GCOMM_EXCEPTION_HPP 12 #define GCOMM_EXCEPTION_HPP 13 14 #include "gu_throw.hpp" 15 16 /*! 17 * Assert macro for runtime condition checking. This should be used 18 * for conditions that may depend on external input and are required 19 * to validate correct protocol operation. 20 */ 21 #define gcomm_assert(cond_) \ 22 if ((cond_) == false) gu_throw_fatal << #cond_ << ": " 23 24 #endif // GCOMM_EXCEPTION_HPP 25