
Hi Victor, as you wrote: [snip] "Victor A. Wagner Jr." <vawjr@rudbek.com> wrote in message news:6.2.0.14.2.20050417092516.08342e98@mail.rudbek.com...
I assumed (dangerous, I know) that NO post conditions would be tested on exception but those explicitly done in the exception stuff. (maybe they
all
will be if NO exception conditions are mentioned? like a default constructor being built by the compiler).
You are right. If an exception occurs NO post conditions are tested. If you want a condition to be tested when an exception is thrown, define an EXCEPTIONAL condition (I find this useful for testing that the object was not changed = the strong exception guarentee). By the way, I use the EXCEPtTIONAL condition as a technique to ensure that no exception is thrown (this can be useful if a method's interface allows throwing but you are sure that your current implementation does not throw): EXCEPTIONAL(lambda::constant(false)); // this will always fail if an exception is thrown Hope that clarifies things for you. Yariv.