Fwd: [erlang-questions] defining default functions for a module
Attila Rajmund Nohl
attila.r.nohl@REDACTED
Wed Nov 11 10:57:31 CET 2009
Of course, I've wanted to send this to the list...
---------- Forwarded message ----------
From: Attila Rajmund Nohl <attila.r.nohl@REDACTED>
Date: Wed, 11 Nov 2009 10:57:02 +0100
Subject: Re: [erlang-questions] defining default functions for a module
To: Pablo Platt <pablo.platt@REDACTED>
2009/11/11, Pablo Platt <pablo.platt@REDACTED>:
[...]
> I thought a behavior will solve my need but it only recommend a module
> structure for the compiler.
It seems I'm not the only one missing inheritance :-) You can try code
like this:
case catch CBModule:cb_function(Parameters) of
{'EXIT', {undef, _TraceBack}}=_Error ->
call_default(Parameters);
Result ->
Result
end,
More information about the erlang-questions
mailing list