Skip to content

Commit

Permalink
python: fix return values from generated Foo_setMember() implementati…
Browse files Browse the repository at this point in the history
…on (thanks notspiff)
  • Loading branch information
Montellese committed Feb 10, 2015
1 parent 9cf3094 commit 2f761f9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xbmc/interfaces/python/PythonSwig.cpp.template
Original file line number Diff line number Diff line change
Expand Up @@ -511,19 +511,19 @@ void doClassMethodInfo(Node clazz, List initTypeCalls)
{
CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage());
PyErr_SetString(PyExc_TypeError, e.GetMessage());
return NULL;
return -1;
}
catch (const XbmcCommons::Exception& e)
{
CLog::Log(LOGERROR,"EXCEPTION: %s",e.GetMessage());
PyErr_SetString(PyExc_RuntimeError, e.GetMessage());
return NULL;
return -1;
}
catch (...)
{
CLog::Log(LOGERROR,"EXCEPTION: Unknown exception thrown from the call \"${classNameAsVariable}_getMember()\"");
PyErr_SetString(PyExc_RuntimeError, "Unknown exception thrown from the call \"${classNameAsVariable}_getMember()\"");
return NULL;
return -1;
}

<%
Expand Down

0 comments on commit 2f761f9

Please sign in to comment.