[erlang-questions] Guards on assignment (i.e. assertions)
Vik Olliver
vik@REDACTED
Mon Mar 1 22:01:26 CET 2010
Nicholas Frechette wrote:
> You could easily make a user space assert macro. One that can optionally
> take a message to print out as well on failure, and you could compile it out
> in opt (non-debug) builds (courtesy or the erlang preprocessor)
>
> Something like:
> ?ASSERT(B > C when is_integer(B), "Bad value for B"),
Doesn't eunit do this?
Vik :v)
More information about the erlang-questions
mailing list