[erlang-questions] common test hiding errors?

Loïc Hoguin <>
Wed Aug 10 10:04:04 CEST 2011


On 08/10/2011 12:07 AM, Joel Reymont wrote:
> The following is what I see in logs/raw.log.
> 
> I know the game has crashed because the players are leaving and because showdown:winners did not return.
> 
>     =ERROR REPORT==== 9-Aug-2011::22:59:35 ===
>     sitgo.erl:60 <0.258.0> hands ranked(<0.258.0>) call showdown:winners([{hand,<0.259.0>,1,[259,771],0,10,none,0}],[{0,[]}])
>     
>     =ERROR REPORT==== 9-Aug-2011::22:59:35 ===
>     observer.erl:201 <0.275.0> Game 1: LEAVE -> 5
>     (<0.258.0>) call showdown:winners([{hand,<0.259.0>,1,[259,771],0,10,none,0}],[{0,[]}],[])
>     (<0.258.0>) call showdown:'-winners/3-fun-0-'({hand,<0.259.0>,1,[259,771],0,10,none,0},[])
>     
>     =ERROR REPORT==== 9-Aug-2011::22:59:35 ===
>     observer.erl:201 <0.275.0> Game 1: LEAVE -> 4
>     
>     =ERROR REPORT==== 9-Aug-2011::22:59:35 ===
>     observer.erl:201 <0.275.0> Game 1: LEAVE -> 3
> 
> Invoking showdown:winners at the Erlang prompt gives me an error.
> 
>     Eshell V5.8.4  (abort with ^G)
>     1> showdown:winners([{hand,self(),1,[259,771],0,10,none,0}],[{0,[]}]).  
>     ** exception error: no function clause matching 
>                         gb_trees:is_defined(<0.31.0>,[])
>          in function  lists:'-filter/2-lc$^0/1-0-'/2
>          in call from showdown:winners/3
> 
> How do I make Common Test show me this error during testing?

Are you catching the exception perhaps? The error message you get seems
custom so I'm guessing your code catches the exception and then prints
the error message ct gives you. So the test doesn't crash and ct doesn't
know about that error.

-- 
Loïc Hoguin
Dev:Extend



More information about the erlang-questions mailing list