Skip to content

Commit

Permalink
Eliminate use of old catch in eunit
Browse files Browse the repository at this point in the history
  • Loading branch information
richcarl committed Feb 2, 2025
1 parent 74cd1fe commit 3d12565
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/eunit_server.erl
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,10 @@ server_command(From, {start, Job}, St) ->
server_command(From, stop, St) ->
%% unregister the server name and let remaining jobs finish
server_command_reply(From, {error, stopped}),
catch unregister(St#state.name),
try unregister(St#state.name)
catch
error:badarg -> ok
end,
server(St#state{stopped = true});
server_command(From, {watch, Target, _Opts}, St) ->
%% the code watcher is only started on demand
Expand Down

0 comments on commit 3d12565

Please sign in to comment.