Replace CommandException with Exception