Throw exeption when command fails.