I have a gen server that calls other module with Websockex.send_frame, sometimes send_frame exits and parent gen server process exits too, so the only way I can handle it is to use try/catch :exit.
The spec of send_frame tells us that it returns result tuple, but it can exit in abnormal situation. I think there should be two variants: send_frame - never exits and returns :ok/:error, send_frame! - returns or exits.
I have a gen server that calls other module with
Websockex.send_frame
, sometimes send_frame exits and parent gen server process exits too, so the only way I can handle it is to usetry/catch :exit
.The spec of
send_frame
tells us that it returns result tuple, but it can exit in abnormal situation. I think there should be two variants:send_frame
- never exits and returns:ok/:error
, send_frame! - returns or exits.https://github.com/Azolo/websockex/blob/ce7064e1d6e8dfb1bba1bb8d3e75b71b88aabc1e/lib/websockex.ex#L413