[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: level argument for assert
- From: Philipp Janda <siffiejoe@...>
- Date: Wed, 02 Jan 2013 18:21:51 +0100
Am 02.01.2013 12:05, schrieb Thijs Schreijer:
So to me it works perfectly well, the one caveat being that if you use it to check on returned function values, you cannot use the level argument with functions that return more than 1 value.
Another caveat is that some functions in os and many functions in io
return nil,msg,errno in case of error, and this would mess with the
level argument ...
The upside is that it becomes very easy to use the other very common use of assert; argument checking (the way I added it to foo() in the example) with a proper level reported to the enduser.