O'Reilly logo
  • Roberto Orsini thinks this is interesting:

To handle an exception from a constructor initializer, we must write the constructor as a function try block. A function try block lets us associate a group of catch clauses with the function as a whole.


Cover of C++ Primer, Fourth Edition


Pippo::Pippo() try : field1(val1), field2(val2) { // function body } catch (Exception &e) { }