Add constructor for class Exception.