Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #10 from jlouis/jlouis-with-cassandra-call-convention

Pick a calling convention for with_cassandra/2.
  • Loading branch information...
commit 92eb5aa0edb21d3fc8f17f1ff560a6d23cf3d6b7 2 parents c473519 + 3a838f6
Louis-Philippe Gauthier lpgauth authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 src/cassanderl.erl
10 src/cassanderl.erl
View
@@ -60,9 +60,15 @@ with_cassandra(Config, F) ->
undefined ->
dispcount:checkin(Config, Ref, died),
ok;
- Client2 ->
+ {error, Reason} ->
+ dispcount:checkin(Config, Ref, died),
+ {error, {'fun', Reason}};
+ {ok, Client2} ->
+ dispcount:checkin(Config, Ref, Client2),
+ ok;
+ {ok, Res, Client2} ->
dispcount:checkin(Config, Ref, Client2),
- ok
+ {ok, Res}
catch
C:E ->
dispcount:checkin(Config, Ref, died),
Please sign in to comment.
Something went wrong with that request. Please try again.