To throw an exception in case of error reported during command run