Change Exception to SparkException in checkpoint

It's better to change to SparkException. However, it's a breaking change since it will change the exception type.