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

Be dynamic about raised exceptions for object not found #46

Open
tcmitchell opened this issue Apr 2, 2020 · 0 comments · Fixed by #49
Open

Be dynamic about raised exceptions for object not found #46

tcmitchell opened this issue Apr 2, 2020 · 0 comments · Fixed by #49
Assignees

Comments

@tcmitchell
Copy link

pySBOL raises a RuntimeError when an object is not found. The native python SBOL library raises SBOLError. Allow for both by dynamically configuring a NotFoundError like so:

# Set up the not found error for catching
try:
    # SBOLError is in the native python module
    NotFoundError = SBOLError
except NameError:
    # The swig wrapper raises RuntimeError on not found
    NotFoundError = RuntimeError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant