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

Take out extra, unnecessary isopen checks #255

Merged
merged 1 commit into from
Aug 25, 2022
Merged

Take out extra, unnecessary isopen checks #255

merged 1 commit into from
Aug 25, 2022

Commits on Aug 24, 2022

  1. Take out extra, unnecessary isopen checks

    We check `Base.check_open`, then `iswritable` checks `isopen`, and then we
    check `isopen` again in `f_send` before we actually write. None of this is
    particularly problematic except that if our bio isn't open in `Base.check_open`
    then we get an `IOError`, but if `iswritable` fails, we get an `ArgumentError`.
    
    By delaying the `isopen` check until `f_send`, I believe that will result in
    a more predictable `MbedException` being thrown consistently.
    quinnj committed Aug 24, 2022
    Configuration menu
    Copy the full SHA
    97703b2 View commit details
    Browse the repository at this point in the history