catch badarg exceptions on invalid callback procs

This commit is contained in:
Frank Diebolt 2019-01-31 18:14:36 +01:00
parent 9b66894dda
commit 4ff4711d4f
1 changed files with 5 additions and 1 deletions

View File

@ -173,4 +173,8 @@ calc_checksum(Data) ->
callback(undefined, IQRes, Fun) ->
Fun(IQRes);
callback(Proc, IQRes, Ctx) ->
catch Proc ! {iq_reply, IQRes, Ctx}.
try
Proc ! {iq_reply, IQRes, Ctx}
catch _:badarg ->
ok
end.