Skip to content
Snippets Groups Projects
Commit f17ed9b5 authored by jcarpent's avatar jcarpent
Browse files

[Exception] Fix bug when returning personalized exception

parent 8771002c
No related branches found
No related tags found
No related merge requests found
/* /*
* Copyright (c) 2015-2016 LAAS-CNRS * Copyright (c) 2015-2018 LAAS-CNRS
* *
* This file is part of eigenpy. * This file is part of eigenpy.
* eigenpy is free software: you can redistribute it and/or * eigenpy is free software: you can redistribute it and/or
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
#include "eigenpy/exception.hpp" #include "eigenpy/exception.hpp"
#include "eigenpy/registration.hpp" #include "eigenpy/registration.hpp"
#include <boost/python/exception_translator.hpp>
namespace eigenpy namespace eigenpy
{ {
...@@ -26,7 +28,7 @@ namespace eigenpy ...@@ -26,7 +28,7 @@ namespace eigenpy
{ {
assert(NULL!=pyType); assert(NULL!=pyType);
// Return an exception object of type pyType and value object(e). // 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() void Exception::registerException()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment