[erlang-questions] Non-reproducible bug on a live erlang system

Scott Lystig Fritchie fritchie@REDACTED
Mon Jan 18 07:26:40 CET 2010

Attila Rajmund Nohl <attila.r.nohl@REDACTED> wrote:

arn> You can always add some assert-like statements (i.e. if you know
arn> that a variable must not bound to the 'undefined' atom at a certain
arn> point in the code, you can add something like 'Variable /=
arn> undefined') where you think something is wrong.

Er, a small correction, I think you meant 'Variable = undefined'.  I
fyou use '/=', you end up with a boolean expression and nothing to cause
a crash if the value is false.  You could use:

    true = (Variable /= undefined)

... but that's nearly 48% more code.  :-)


More information about the erlang-questions mailing list