[erlang-questions] Why can not catch exception in gen_server init callback function?

Eric Newhuis <>
Wed Mar 31 17:54:06 CEST 2010


init is called on a separate process

On Mar 31, 2010, at 10:48 AM, 钱晓明 wrote:

> Hi, Why can not catch exception in gen_server init callback function?
> 
> init([]) ->
>    erlang:error(myerror),
>    {ok, #state{}}.
> 
> Ex = (catch myserver:start_link()).
> 
> process is terminated by exception myerror, but Ex is still unbound. Why?



More information about the erlang-questions mailing list