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(ImageBuf): auto print uncaught IB errors #3949

Merged
merged 1 commit into from
Sep 1, 2023

Commits on Aug 23, 2023

  1. feat(ImageBuf): auto print uncaught IB errors

    Advanced users know to check error returns and retrieve errors.
    
    New users often just try OIIO calls with no error checks when they
    don't get behavior they want, ask questions to the dev team. We
    hypothesize that if they only saw the text of the error messages that
    they never retrieved, they could probably self-diagnose many of their
    problems.
    
    This patch makes an ImageBuf, when it is destryed, print any pending
    error messages that were never retrieved. It happens by default, but
    can be disabled by setting the new global attribute
    "imagebuf:print_uncaught_errors" to 0 (it defaults to 1).
    
    This doesn't cover everything, but for ImageBuf and ImageBufAlgo,
    maybe it will help some users? It could annoy advanced users who
    intend to not retrieve error messages (why?) but still don't want
    this printed. But that's who the new attribute is for.
    
    Signed-off-by: Larry Gritz <lg@larrygritz.com>
    lgritz committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    b031222 View commit details
    Browse the repository at this point in the history