Check the returned exception depending on pixels Id (see #10291)