In the following example a reference to reason
is stored in both parent and child. I'd like to avoid this and store the reference only in parent (usual use of Java exceptions).
import java.lang.{Exception, Throwable}
class FileError(message: String, reason:Throwable) extends Exception(message, reason) {
...
}
How do I initialize a parent class field without storing a value in the child class object?