pyassert.h 598 Bytes
// Copyright (C) 2013  Davis E. King (davis@dlib.net)
// License: Boost Software License   See LICENSE.txt for the full license.


#define pyassert(_exp,_message)                                             \
    {if ( !(_exp) )                                                         \
    {                                                                       \
        PyErr_SetString( PyExc_ValueError, _message );                      \
        boost::python::throw_error_already_set();                           \
    }}