
26 Jun
2006
26 Jun
'06
9:06 a.m.
Jeff Garland wrote:
Well, you're assuming that report will be called in a destructor. If it isn't and some sort of exception is thrown then the application can't handle it because you've eaten it. You could always have 2 versions:
void cpu_time_reporter::report_no_exceptions() throws() void cpu_time_reporter::report()
Or how about: void cpu_time_reporter::report(std::nothrow_t)throw() ? It's situations like this that we have std::nothrow for isn't it? Just a thought. John.