Raise CommandError instead of print/exit.