[erlang-questions] timer:send_interval/3 how to return {error, Reason} value?

litao cheng litaocheng@REDACTED
Thu Oct 16 06:02:01 CEST 2008

Hi, everyone.
When I use timer:send_interval/3, I have some puzzle with the return values:
{ok, TRef}, {error, Reason}.
I see the timer.erl, I know that the timer module is implented by gen_server
behaviour, the exported functions such as send_after, apply_after and so on,
are just call the gen_server:call/2. the gen_server:call/2 may invoke
erlang:exit/1 with some reasons,
but in the timer.erl the timer:req/2 don't catch the exit signal. So I
wonder how the timer:send_interval/3 return {error, Reason}. Is it a bug?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20081016/596425c4/attachment.htm>

More information about the erlang-questions mailing list