It would be handy to be able to wrap constructors, so in particular we can easily write a MyError which extends from std::runtime_error and supports something like:
if (bar > barMax)
throw MyError("foo failed because bar=%d is greater than %d", bar, barMax);
Granted, this is already possible in a roundabout way if you're happy to extend std::exception instead.
It would be handy to be able to wrap constructors, so in particular we can easily write a MyError which extends from std::runtime_error and supports something like:
Granted, this is already possible in a roundabout way if you're happy to extend std::exception instead.