This is a good start, but if you look at the JIRA, this exception won't actually echo back to the user the name they provided, which is bad form. I think you should capture the argument the user provided first then echo it back to them:

```
private val schedulingModeConf = conf.get("spark.scheduler.mode", "FIFO")
val schedulingMode: SchedulingMode = try {
    SchedulingMode.withName(schedulingModeConf).toUpperCase)
  } catch {
   case e: java.util.NoSuchElementException =>
     throw new SparkException(s"unrecognized spark.scheduler.mode: $schedulingModeConf")
  }
```
Don't even bother re-sending the NoSuchElementException... it doesn't convey anything useful to the user.