[SPARK-4572][SQL] catch exception of sql execution for spark-sql

While using *spark-sql*, found it usually **exits** when sql failed with some execption, and you need to rerun *spark-sql* . Simply add *try ... catch* to change its default action.