therefore we have to initialize errno before a call that could set errno in an error case.
refs #24379