pyassert.h 598 Bytes
Newer Older
1
2
// Copyright (C) 2013  Davis E. King (davis@dlib.net)
// License: Boost Software License   See LICENSE.txt for the full license.
Davis King's avatar
Davis King committed
3
4
5
6
7
8
9
10


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