"...git@developer.sourcefind.cn:OpenDAS/detectron2.git" did not exist on "63e10e00f1d690f134342ea32fbe0af1645ccb0b"
pyassert.h 708 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.
3
4
#ifndef DLIB_PYaSSERT_H__
#define DLIB_PYaSSERT_H__
Davis King's avatar
Davis King committed
5

6
#include <boost/python.hpp>
Davis King's avatar
Davis King committed
7
8
9
10
11
12
13

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

#endif // DLIB_PYaSSERT_H__