Scala: How can I catch an exception thrown by a parent class's constructor?

Viewed 1072

Say I have the following:

class Parent {
  // does some things that may result in an exception
  throw new IllegalArgumentException
}

class Child extends Parent

I'd like for Child's constructor to catch, wrap, and rethrow the exception thrown by Parent's constructor. How can I do this?

2 Answers
Related