Mnesia documentation

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Mnesia documentation

Aaron Pankratz
Hi, in the Mnesia documentation has this code in section 4.3:

          case mnesia:wait_for_tables([a, b], 20000) of
            {timeout,   RemainingTabs} ->
              panic(RemainingTabs);
            ok ->
              synced
          end.

I get and error, "function panic/1 undefined", when I try to use it.
What is that panic function?

Best,
Aaron
Reply | Threaded
Open this post in threaded view
|

Re: Mnesia documentation

Luke Bakken-2
Hi Aaron,

panic/1 exists and is an exported function in the "company" module in
the master branch:

~/development/erlang/otp (master=)
$ find . -type f -name '*.erl' -exec egrep '^panic\(' {} +
./lib/mnesia/doc/src/company.erl:panic(X) -> exit({panic, X}).

This appears to be example code used in the mnesia documentation.

Thanks,
Luke

On Sat, Dec 7, 2019 at 12:21 PM Aaron Pankratz <[hidden email]> wrote:

>
> Hi, in the Mnesia documentation has this code in section 4.3:
>
>           case mnesia:wait_for_tables([a, b], 20000) of
>             {timeout,   RemainingTabs} ->
>               panic(RemainingTabs);
>             ok ->
>               synced
>           end.
>
> I get and error, "function panic/1 undefined", when I try to use it.
> What is that panic function?
>
> Best,
> Aaron
Reply | Threaded
Open this post in threaded view
|

Re: Mnesia documentation

Aaron Pankratz
Thank you, Luke!


On Sat, Dec 7, 2019 at 2:34 PM Luke Bakken <[hidden email]> wrote:

>
> Hi Aaron,
>
> panic/1 exists and is an exported function in the "company" module in
> the master branch:
>
> ~/development/erlang/otp (master=)
> $ find . -type f -name '*.erl' -exec egrep '^panic\(' {} +
> ./lib/mnesia/doc/src/company.erl:panic(X) -> exit({panic, X}).
>
> This appears to be example code used in the mnesia documentation.
>
> Thanks,
> Luke
>
> On Sat, Dec 7, 2019 at 12:21 PM Aaron Pankratz <[hidden email]> wrote:
> >
> > Hi, in the Mnesia documentation has this code in section 4.3:
> >
> >           case mnesia:wait_for_tables([a, b], 20000) of
> >             {timeout,   RemainingTabs} ->
> >               panic(RemainingTabs);
> >             ok ->
> >               synced
> >           end.
> >
> > I get and error, "function panic/1 undefined", when I try to use it.
> > What is that panic function?
> >
> > Best,
> > Aaron