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

Better error reporting for IOFile, esp. for OpenEXR writes #2780

Merged
merged 1 commit into from
Dec 10, 2020

Conversation

lgritz
Copy link
Collaborator

@lgritz lgritz commented Dec 2, 2020

Filesystem::IOFile constructor now upon an error opening the file will
set the error message appropriately.

Move IOProxy::error() implementation from inline to be in
filesystem.cpp to hide its details, use a static mutex to make error
set and retrieval be thread-safe (we presume that the rare chance that
multiple threads will be setting or getting IOProxy errors
simultaneously are rare enough that it's not a thread performance
issue, and if the user is getting file I/O errors, a bit of minor
locking is the least of their worries).

Better checking of these errors in OpenEXR input and output open
operations. Hopefully this means that exr file I/O errors will
percolate up more helpful error messages.

Filesystem::IOFile constructor now upon an error opening the file will
set the error message appropriately.

Move IOProxy::error() implementation from inline to be in
filesystem.cpp to hide its details, use a static mutex to make error
set and retrieval be thread-safe (we presume that the rare chance that
multiple threads will be setting or getting IOProxy errors
simultaneously are rare enough that it's not a thread performance
issue, and if the user is getting file I/O errors, a bit of minor
locking is the least of their worries).

Better checking of these errors in OpenEXR input and output open
operations.  Hopefully this means that exr file I/O errors will
percolate up more helpful error messages.
@fabiencastan
Copy link
Contributor

I'm using vcpkg to build oiio on windows, but the version available on vcpkg is still 2.1.16.0.
I tried to update but there are conflicts with 2 patches:
https://github.com/microsoft/vcpkg/blob/master/ports/openimageio/fix-dependency.patch
https://github.com/microsoft/vcpkg/blob/master/ports/openimageio/fix-tools-path.patch

It would be good for the long term to see if the vcpkg patches could be integrated in oiio.

@lgritz lgritz merged commit 859020f into AcademySoftwareFoundation:master Dec 10, 2020
lgritz added a commit to lgritz/OpenImageIO that referenced this pull request Dec 10, 2020
…ftwareFoundation#2780)

Filesystem::IOFile constructor now upon an error opening the file will
set the error message appropriately.

Move IOProxy::error() implementation from inline to be in
filesystem.cpp to hide its details, use a static mutex to make error
set and retrieval be thread-safe (we presume that the rare chance that
multiple threads will be setting or getting IOProxy errors
simultaneously are rare enough that it's not a thread performance
issue, and if the user is getting file I/O errors, a bit of minor
locking is the least of their worries).

Better checking of these errors in OpenEXR input and output open
operations.  Hopefully this means that exr file I/O errors will
percolate up more helpful error messages.
@lgritz lgritz deleted the lg-exrutf8 branch December 10, 2020 18:07
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 this pull request may close these issues.

None yet

2 participants