Commits

Anonymous committed 4999ea3

human-readable error handling

  • Participants
  • Parent commits 459ffb4

Comments (0)

Files changed (1)

 %%% Internal functions
 %%--------------------------------------------------------------------
 get_pid_pool(PoolId, RequestCount) ->
-    emongo_sup:worker_pid(PoolId, emongo_sup:pools(), RequestCount).
+    case emongo_sup:worker_pid(PoolId, emongo_sup:pools(), RequestCount) of
+        undefined -> throw(emongo_busy);
+        Val -> Val
+    end.
 
 
 fold_documents(F, Value, Resp) ->