Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exceptions aren't translated to Python #16

Open
thatch opened this issue Jun 18, 2018 · 1 comment
Open

Exceptions aren't translated to Python #16

thatch opened this issue Jun 18, 2018 · 1 comment

Comments

@thatch
Copy link

thatch commented Jun 18, 2018

For example, playing in the REPL I forgot to close a path:

>>> pco = pyclipper.PyclipperOffset()
>>> pc.AddPath([[0,0], [10,0], [10,10], [0, 10]], pyclipper.JT_ROUND, pyclipper.ET_CLOSEDPOLYGON)
terminate called after throwing an instance of 'ClipperLib::clipperException'
  what():  AddPath: Open paths must be subject.
Aborted (core dumped)
@anthrotype
Copy link
Member

it's possible to declare such functions that may throw a c++ exception with an except +

http://cython.readthedocs.io/en/latest/src/userguide/wrapping_CPlusPlus.html#exceptions

would you like to work on a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants