[erlang-questions] Question on Diagraph module

Bengt Kleberg bengt.kleberg@REDACTED
Tue Jan 29 09:52:55 CET 2008


Greeteings,

Presumably you are getting the error because G is gone.

I have never used digraphs but the manual page
(http://erlang.org/doc/man/digraph.html) says:

"The digraph will, however, be deleted if the process that created the
digraph terminates."

Your shell process, that created G, has just crashed.


bengt

On Tue, 2008-01-29 at 08:16 +0000, Balu Balasubramanian wrote:
> Hi,
> 
> I am new to Erlang!
> 
> Can some one explain why I am getting the last error message (badarith) that I get with digraph module in stdlib.
>  
> Erlang (BEAM) emulator version 5.5.4 [source] [64-bit] [async-threads:0] [kernel -poll:false]
>  
> Eshell V5.5.4  (abort with ^G)
> 1> G=digraph:new().
> {graph,14,15,16,true}
> 2> digraph:info(G).
> [{cyclicity,cyclic},{memory,847},{protection,protected}]
> 3> digraph:info().  
>  
> =ERROR REPORT==== 8-Jan-2008::22:02:06 ===
> Error in process  with exit value: {undef,[{digraph,info,[]},{erl_eval,d o_apply,5},{shell,exprs,6},{shell,eval_loop,3}]}
>  
> ** exited: {undef,[{digraph,info,[]},
>                    {erl_eval,do_apply,5},
>                    {shell,exprs,6},
>                    {shell,eval_loop,3}]} **
>  
> % the above error is obvious as digraph:info/0 is udnefined. But now,
>  
> 4> digraph:info(G).
>  
> =ERROR REPORT==== 8-Jan-2008::22:02:08 ===
> Error in process  with exit value: {badarith,[{digraph,info,1},{erl_eval ,do_apply,5},{shell,exprs,6},{shell,eval_loop,3}]}
>  
> ** exited: {badarith,[{digraph,info,1},
>                       {erl_eval,do_apply,5},
>                       {shell,exprs,6},
>                       {shell,eval_loop,3}]} **
>  
> % Can some one please explain the above badarith error? Are there known issues with the digraph module?
>  
> 5> init:script_id().
> {"OTP  APN 181 01","R11B"}
> 6>
>  
> 
> Thanks
> Balu
>  
> 
> _________________________________________________________________
> Connect and share in new ways with Windows Live.
> http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_012008
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list