Skip to content

Commit 6dc1ee2

Browse files
author
Chip Senkbeil
committed
Added missing method to expose error reporting flag
1 parent 26fd286 commit 6dc1ee2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

repl/scala-2.10/src/main/scala/org/apache/spark/repl/SparkIMain.scala

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,16 @@ import org.apache.spark.annotation.DeveloperApi
194194
// NOTE: Exposed to repl package since used by SparkExprTyper and SparkILoop
195195
private[repl] lazy val reporter: ConsoleReporter = new SparkIMain.ReplReporter(this)
196196

197+
/**
198+
* Determines if errors were reported (typically during compilation).
199+
*
200+
* @note This is not for runtime errors
201+
*
202+
* @return True if had errors, otherwise false
203+
*/
204+
@DeveloperApi
205+
def isReportingErrors = reporter.hasErrors
206+
197207
import formatting._
198208
import reporter.{ printMessage, withoutTruncating }
199209

0 commit comments

Comments
 (0)