• Supermariofan67@programming.dev
    link
    fedilink
    arrow-up
    10
    ·
    11 months ago

    The code probably used an if statement somewhere to throw an exception if some condition is incorrect, then called strerror(), which gets the status of the last syscall. But the error was probably a logical one in the application and had nothing to do with the last syscall. Or perhaps success of a syscall is itself an error condition. For example if a file already existing should be detected and cause a failure, calling stat() successfully would be an error

  • dave
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    2
    ·
    11 months ago

    Just hide the details.