Exception handling idioms

Vance Shipley <>
Thu Aug 25 20:21:56 CEST 2005


Tim,

What I do is to write the gen_server like this:

handle_call({Atom, Int, List}, _, State)
        when is_atom(Atom), is_integer(Int), is_list(List) ->
    ...
    {reply, Result, State};
handle_call(_, {Pid, _Tag}, State) ->
    exit(Pid, badarg),
    {noreply, State}.
    

	-Vance

On Thu, Aug 25, 2005 at 07:32:51PM +0930, Tim Bates wrote:
}
}  I have a gen_server process, which if an error occurs inside it due to 
}  bad input I want to force the caller to crash. I find myself doing this 




More information about the erlang-questions mailing list