Re: [suggestion] assert: accept functions as "message"-argument
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: [suggestion] assert: accept functions as "message"-argument
- From: Jorge <xxopxe@...>
- Date: 2013年1月14日 16:13:37 -0200
On 14/01/13 14:55, Wolfgang Pupp wrote:
My suggestion is to not only allow strings as "message"-argument, but
also functions; if a function is supplied it only gets called when the
assertion actually fails and is expected to return a string describing
the problem. Example:
And what to do when your error handling function errors?
Yes, I do have bugs in my debugging code :\
Jorge