[erlang-questions] handling crash on db connect
Wed Jun 5 22:59:20 CEST 2013
I'm using gar1t's redis driver and find that if the redis server is
running, redis:connect() causes the client to crash. try/catch doesn't
handle it, so I think it's linking some other process which then crashes
and propagates the exit.
What's the right way to handle the crash, in order to report some
reasonable error and/or do a sleep/retry loop? One obvious way is
trapexit() and explicitly handle the exit signal, but I have the impression
that this would be overly drastic in Erlang. Connection failure to a db
should be a fairly routine error condition, so I feel like there's
something I'm missing.
Any advice? Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions