Skip to content

Commit 03a9c04

Browse files
committed
Replace Catch expressions with Try-Catch for Erlang/OTP 29
1 parent 91aa8e3 commit 03a9c04

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/stringprep.erl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,15 @@ start() ->
4141

4242
load_nif() ->
4343
SOPath = p1_nif_utils:get_so_path(?MODULE, [stringprep], "stringprep"),
44-
case catch erlang:load_nif(SOPath, 0) of
44+
try erlang:load_nif(SOPath, 0) of
4545
ok -> ok;
4646
{error, {reload, _}} -> ok;
4747
Err -> error_logger:warning_msg("unable to load stringprep NIF: ~p~n", [Err]),
4848
{error, unable_to_load_nif}
49+
catch
50+
_:Error ->
51+
error_logger:warning_msg("unable to load stringprep NIF: ~p~n", [Error]),
52+
{error, unable_to_load_nif}
4953
end.
5054

5155
-spec tolower(iodata()) -> binary() | error.

0 commit comments

Comments
 (0)