int: Add some more debugging help for OCIO exceptions#5190
Merged
Conversation
818c71b to
b3908ac
Compare
In PR 5164, we changed to not be quite as aggressive in treating OCIO exceptions as real errors. All still good with that, but sometimes it is helpful to know exactly what OCIO wants to tell us, for debugging. In this PR, we allow our color debug mode (triggered when environment variable OIIO_DEBUG_COLOR is set to nonzero) to print debugging messages that reveal the exception messages. It's a debugging aid for developers, no users will want this. In ordinary operations, we really do want to just ignore those exceptions. But if something is misbehaving and we don't know why, it may be helpful to know which of the exceptions is being caught and what the message was. Signed-off-by: Larry Gritz <lg@larrygritz.com>
b3908ac to
1fb601a
Compare
Collaborator
Author
|
@zachlewis This look ok to you? |
zachlewis
approved these changes
May 12, 2026
Collaborator
zachlewis
left a comment
There was a problem hiding this comment.
I think this is a great idea! As you say, OCIO raises a lot of exceptions... I was wondering how to gracefully handle this with OIIO, and of course this is the most intuitive way. Nicely done. LGTM.
6e42dfb
into
AcademySoftwareFoundation:main
55 of 56 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In PR #5164, we changed to not be quite as aggressive in treating OCIO exceptions as real errors. All still good with that, but sometimes it is helpful to know exactly what OCIO wants to tell us, for debugging.
In this PR, we allow our color debug mode (triggered when environment variable OIIO_DEBUG_COLOR is set to nonzero) to print debugging messages that reveal the exception messages. It's a debugging aid for developers, no users will want this. In ordinary operations, we really do want to just ignore those exceptions. But if something is misbehaving and we don't know why, it may be helpful to know which of the exceptions is being caught and what the message was.