ide: add ide_read_error() inline helper