MCPcopy Create free account
hub / github.com/chokkan/crfsuite / DirectorException

Class DirectorException

swig/python/export_wrap.cpp:3137–3169  ·  view source on GitHub ↗

base class for director exceptions */

Source from the content-addressed store, hash-verified

3135
3136 /* base class for director exceptions */
3137 class DirectorException {
3138 protected:
3139 std::string swig_msg;
3140 public:
3141 DirectorException(PyObject *error, const char* hdr ="", const char* msg ="")
3142 : swig_msg(hdr)
3143 {
3144 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
3145 if (strlen(msg)) {
3146 swig_msg += " ";
3147 swig_msg += msg;
3148 }
3149 if (!PyErr_Occurred()) {
3150 PyErr_SetString(error, getMessage());
3151 }
3152 SWIG_PYTHON_THREAD_END_BLOCK;
3153 }
3154
3155 const char *getMessage() const
3156 {
3157 return swig_msg.c_str();
3158 }
3159
3160 static void raise(PyObject *error, const char *msg)
3161 {
3162 throw DirectorException(error, msg);
3163 }
3164
3165 static void raise(const char *msg)
3166 {
3167 raise(PyExc_RuntimeError, msg);
3168 }
3169 };
3170
3171 /* unknown exception handler */
3172 class UnknownExceptionHandler

Callers 1

raiseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected