Github user vanzin commented on a diff in the pull request: https://github.com/apache/spark/pull/21368#discussion_r189649450 --- Diff: repl/scala-2.11/src/main/scala/org/apache/spark/repl/SparkILoop.scala --- @@ -44,7 +44,14 @@ class SparkILoop(in0: Option[BufferedReader], out: JPrintWriter) @transient val spark = if (org.apache.spark.repl.Main.sparkSession != null) { org.apache.spark.repl.Main.sparkSession } else { - org.apache.spark.repl.Main.createSparkSession() + try { + org.apache.spark.repl.Main.createSparkSession() + } catch { + case e: Exception => + println("Failed to initialize Spark session:") + e.printStackTrace() + sys.exit(1) --- End diff -- My usual response is "this is not a public class" (it's not in the public API docs), but let me see if it's easy to restrict the `sys.exit` to spark-shell invocations.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org