[SPARK-2752]spark sql cli should not exit when exception

Spark sql cli now will exit directly when we input a bad sql, fix it by catching the exception and print the error~
And they cause compilation failure.