[SPARK-4623]Add the some error infomation if using spark-sql in yarn-cluster mode

If using spark-sql in yarn-cluster mode, print an error infomation just as the spark shell in yarn-cluster mode.