[erlang-questions] handling crash on db connect
Paul Rubin
paul@REDACTED
Thu Jun 6 17:38:07 CEST 2013
Jesper Louis Andersen wrote:
Rewrite the driver? It makes sense to return some kind of error tuple in
this case because it is expected behaviour that you cannot establish a
connection. Then you can crash on
ok = redis:connect(…)
Thanks. It's odd that redis:connect() returns {ok, Connection} in the
success case, which had me expecting it to return an error result in the
failure case instead of crashing.
I wonder if I could just be making some dumb error, and/or found a bug in
the driver, rather than intended behavior.
I've opened a github issue at https://github.com/gar1t/erlang-redis/issues/1
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130606/361ddcde/attachment.htm>
More information about the erlang-questions
mailing list