Example #1
0
void InvariantChecker::checkInvariants(HasInvariants const* _this, char const* _fn, char const* _file, int _line, bool _pre)
{
	if (!_this->invariants())
	{
		::boost::exception_detail::throw_exception_(FailedInvariant(), _fn, _file, _line);
	}
}
Example #2
0
void InvariantChecker::checkInvariants() const
{
	if (!m_this->invariants())
	{
		cwarn << "Invariant failed in" << m_function << "at" << m_file << ":" << m_line;
		::boost::exception_detail::throw_exception_(FailedInvariant(), m_function, m_file, m_line);
	}
}
Example #3
0
void InvariantChecker::checkInvariants(HasInvariants const* _this, char const* _fn, char const* _file, int _line, bool _pre)
{
	if (!_this->invariants())
	{
		LOG(WARNING) << (_pre ? "Pre" : "Post") << "invariant failed in" << _fn << "at" << _file << ":" << _line;
		::boost::exception_detail::throw_exception_(FailedInvariant(), _fn, _file, _line);
	}
}