Core: the idl parser now properly insert the flags in the ast.
[fail.git] / python / error.cpp
blobbd18eab79460c743fb92c87ec4e4ecc2548bd025
1 #include <Python.h>
2 #include <sstream>
3 #include "error.h"
5 void awful::PythonImpl::Error::NotEnoughParams::ConvertToPython() const
7 std::stringstream msg;
8 msg << "expected " << m_NumExpected << " params, got " << m_NumGot;
9 PyErr_SetString( PyExc_RuntimeError, msg.str().c_str() );
12 void awful::PythonImpl::Error::TypeMismatch::ConvertToPython() const
14 PyErr_SetString( PyExc_TypeError, "type mismatch" );
17 void awful::PythonImpl::Error::NoOverloadFound::ConvertToPython() const
19 PyErr_SetString( PyExc_RuntimeError, "no matching overload found for method call" );