Skip to content

Commit

Permalink
[Exception] Fix bug when returning personalized exception
Browse files Browse the repository at this point in the history
  • Loading branch information
jcarpent committed Jan 17, 2018
1 parent 8771002 commit f17ed9b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/exception.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2016 LAAS-CNRS
* Copyright (c) 2015-2018 LAAS-CNRS
*
* This file is part of eigenpy.
* eigenpy is free software: you can redistribute it and/or
Expand All @@ -17,6 +17,8 @@
#include "eigenpy/exception.hpp"
#include "eigenpy/registration.hpp"

#include <boost/python/exception_translator.hpp>


namespace eigenpy
{
Expand All @@ -26,7 +28,7 @@ namespace eigenpy
{
assert(NULL!=pyType);
// Return an exception object of type pyType and value object(e).
PyErr_SetObject(Exception::pyType,boost::python::object(e).ptr());
PyErr_SetString(PyExc_RuntimeError, e.what());
}

void Exception::registerException()
Expand Down

0 comments on commit f17ed9b

Please sign in to comment.