You might want to consider making this into a case class, which is the recommended way to handle subclasses of Exception in Scala.