
3 Jul
2008
3 Jul
'08
5:12 p.m.
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");