|
Boost : |
From: Greg Colvin (gcolvin_at_[hidden])
Date: 2001-03-20 18:54:13
From: Jesse Jones <jejones_at_[hidden]>
> >Let me suggest the following idiom as a reasonable way to report
> >fatal runtime errors:
> >
> > template <typename X>
> > void error(const X& x) throw() {
> > throw x;
> > }
> >
> >Yes, it looks silly. But it will force a call to unexpected(),
> >which by default will terminate(), and the client can replace
> >the default behavior via the standard set_unexpected() facility.
>
> How does the handler get at x?
By rethrowing it and catching it.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk