This is available as OS\HErrnoException in the www repository.
OS\HErrnoException
Class for exceptions reported via the C h_errno variable
h_errno
namespace HH\Lib\OS; final class HErrnoException extends \Exception {...}
->__construct(HErrno $errno, string $message)
->getHErrno(): HErrno