Boost logo

Boost :

From: Kevlin Henney (kevlin_at_[hidden])
Date: 2001-03-20 01:30:50

In message <02dc01c0b0ff$0a6bf450$37781990_at_[hidden]>, Greg Colvin
<gcolvin_at_[hidden]> writes
>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.

As indeed a straight call to std::unexpected will do. What am I missing?


  Kevlin Henney phone: +44 117 942 2990
  Curbralan Limited mobile: +44 7801 073 508
  mailto:kevlin_at_[hidden] fax: +44 870 052 2289

Boost list run by bdawes at, gregod at, cpdaniel at, john at