-
Notifications
You must be signed in to change notification settings - Fork 154
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
How does the IgnoreError LibraryOption work? #78
Comments
It appears you are correct; the library option is never observed. We'll need to add that (or figure out when/why it was removed). |
Cool! I've been unable to get any of the |
* SaveError and IgnoreError library options are now honored. The default if neither is specified is to save. * If both SaveError and IgnoreError options or both annotations are used at the same time on the same element (class or method), save wins (since it has only a small performance effect if the save is unwanted, but serious problems if the save is wanted but not performed). * Only the following cases will ignore error: a. Ignore option is specified, save option is not specified, and method does not specify either annotation. b. Ignore annotation is specified and save annotation is not. * Centralize logic and document matrix. * Test all combinations in the matrix.
I'd be happy to, but I'm unsure how, since I can't measure the performance benefit. Do you have any recommendations? I guess I can write a custom version of jnr-posix binding getpid or gettimeofday or somet other thing that should return really fast (enough to see the difference)? |
Improvements and fixes for errno saving to fix #78.
We'll call this fixed, since we are now actually processing both the options and the annotations properly. #79 remains open to see if we're doing something wrong when ignoring errno. |
Thanks! Sorry; I have some personal stuff going on, so I haven't had time to finish that one up yet. Soon; I promise :) |
I can't seem to find it anywhere in the code; the only mention is the annotation, but I believe that applies to individual methods (the inverse being SaveError). I thought the goal of LibraryOption was to set the default, however AFAICT IgnoreError isn't used anywhere. This matches my observation that adding
LibraryOption/IgnoreError
(I have a library that doesn't touch errno) doesn't impact performance at all.The text was updated successfully, but these errors were encountered: