[BZ 1069545] Reorder api check exceptions.