Added ErrnoException to deal with libc errors.