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

feat: more granular error messages when looking for shared objects #290

Closed
wants to merge 1 commit into from

Conversation

govinda-kamath
Copy link

@govinda-kamath govinda-kamath commented Oct 21, 2024

  • Had run into a situation where loading libopenslide.so.1 failed because my system had an old version of libglib but the error message shown was libopenslide.so.0 not found.
  • This fixes that by giving the error message for each one of the shared objects the code looks for in case it did not find any.

Signed-off-by: govinda-kamath <[email protected]>
@openslide-bot
Copy link

DCO signed off ✔️

All commits have been signed off. You have certified to the terms of the Developer Certificate of Origin, version 1.1. In particular, you certify that this contribution has not been developed using information obtained under a non-disclosure agreement or other license terms that forbid you from contributing it under the GNU Lesser General Public License, version 2.1.

@govinda-kamath govinda-kamath changed the title more granular error messages feat: more granular error messages when looking for shared objects Oct 21, 2024
@bgilbert
Copy link
Member

Thank you for the PR! Indeed it'd be really good to fix this.

This PR produces an exception chain with three exceptions: the OSError from libopenslide.so.0, followed by the synthetic OSError with all of the error messages, followed by the ModuleNotFoundError. I think a better approach is to skip the synthetic OSError, and instead include each of the original OSErrors in the chain. I've implemented this in #296.

I'll go ahead and close this. Thank you for reporting this issue and proposing a fix!

@bgilbert bgilbert closed this Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants