This repository was archived by the owner on Nov 7, 2018. It is now read-only.

Description
If I call websocket_client:start(Host, Port, ?MODULE), but server is not running, the API generates exception:
** exception exit: {badmatch,{error,econnrefused}}
in function websocket_client:init/1 (d:/DAVEBR~1/src/websocket_client.erl, line 46)
in call from gen_server:init_it/6 (gen_server.erl, line 297)
in call from proc_lib:init_p_do_apply/3 (proc_lib.erl, line 227)
It would be nice to have some callback invoked when connection cannot be established.
Is there any way to catch this exception in my code?
Thanks