[erlang-questions] A style question
Fred Hebert
mononcqc@REDACTED
Fri Feb 12 14:24:35 CET 2010
Wouldn't using mnesia:activity/2 otherwise mean you've got to wrap every
transaction in a try ... catch yourself though? Is that considered an
annoyance or a wanted behaviour (outside of any gen_*)?
On Fri, Feb 12, 2010 at 1:05 AM, Ulf Wiger
<ulf.wiger@REDACTED>wrote:
> There is an alternative that actually has a distinct advantage:
>
> mnesia:activity(
> transaction,
> fun my_transaction_fun/0)
>
> The advantage is that when tracing, you get much more readable output. A
> disadvantage is that you forego the pleasure of inheriting the environment.
>
> Note also the use of mnesia:activity/2 rather than transaction/1. It has
> much better semantics, and is more flexible.
>
> BR,
> Ulf W
>
> Ulf Wiger
> CTO, Erlang Solutions, Ltd.
>
> ---------------------------------------------------
>
> WE'VE CHANGED NAMES!
>
> Since January 1st 2010 Erlang Training and Consulting Ltd. has become
> ERLANG SOLUTIONS LTD.
>
> www.erlang-solutions.com
>
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>
>
More information about the erlang-questions
mailing list