|
Boost : |
From: Tom Brinkman (reportbase_at_[hidden])
Date: 2008-07-03 13:12:54
Is there a way to delay throwing an exception?
Reason #1
Sometimes, one may want to accumulate all error conditions, but ignore
them unless a fatal error condition occurs. These non-throw errors
might be considered warnings, but useful to report if a later fatal
error conditions occurs.
Reason #2
It may be preferable to report all errors at once and not have a throw
after each error. Waiting to throw the error may provide for more
complete error statements.
Example:
my_error error;
error << error1("aaaaa");
error << error2("bbbbbb");
.... <later>
throw error << error3("cccc");
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk