Forum OpenACS Q&A: Re: Assertions in OpenACS

Collapse
4: Re: Assertions in OpenACS (response to 1)
Posted by Kolja Lehmann on
Well but that comes down to
- call the proc
- evaluate one expression (ok, it depends on the sort of test, how long this will take)
- return
in general. And if you are very much concerned about the performance, you can also redefine assert on the production server to return at once. Still normally I think it is better to have a short test which discovers an error you made in your design than saving a few statements and don't discover it.
The code that is executed after an assertion failed doesn't count, because it shouldn't ever be executed. and if it is, it should be worth the effort to find a bug.