Skip to content

Fix OTP catch deprecation warnings#7

Merged
lunagl merged 1 commit into
lunagl:mainfrom
jtdowney:otp-29-fixes
May 24, 2026
Merged

Fix OTP catch deprecation warnings#7
lunagl merged 1 commit into
lunagl:mainfrom
jtdowney:otp-29-fixes

Conversation

@jtdowney

@jtdowney jtdowney commented May 17, 2026

Copy link
Copy Markdown
Contributor

OTP 29 is now out and includes some deprecation warnings I hit with glearray.

❯ gleam test
Downloading packages
 Downloaded 2 packages in 0.01s
  Compiling gleam_stdlib
  Compiling gleeunit
  Compiling glearray
/Users/jtdowney/code/glearray/build/dev/erlang/glearray/_gleam_artefacts/glearray_ffi.erl:8:10: Warning: 'catch ...' is deprecated; please use 'try ... catch ... end' instead.
Compile directive 'nowarn_deprecated_catch' can be used to suppress
warnings in selected modules.
%    8|     case catch element(Index + 1, Array) of
%     |          ^

/Users/jtdowney/code/glearray/build/dev/erlang/glearray/_gleam_artefacts/glearray_ffi.erl:14:10: Warning: 'catch ...' is deprecated; please use 'try ... catch ... end' instead.
Compile directive 'nowarn_deprecated_catch' can be used to suppress
warnings in selected modules.
%   14|     case catch element(Index + 1, Array) of
%     |          ^

/Users/jtdowney/code/glearray/build/dev/erlang/glearray/_gleam_artefacts/glearray_ffi.erl:20:10: Warning: 'catch ...' is deprecated; please use 'try ... catch ... end' instead.
Compile directive 'nowarn_deprecated_catch' can be used to suppress
warnings in selected modules.
%   20|     case catch setelement(Index + 1, Array, Value) of
%     |          ^

/Users/jtdowney/code/glearray/build/dev/erlang/glearray/_gleam_artefacts/glearray_ffi.erl:26:10: Warning: 'catch ...' is deprecated; please use 'try ... catch ... end' instead.
Compile directive 'nowarn_deprecated_catch' can be used to suppress
warnings in selected modules.
%   26|     case catch erlang:insert_element(Index + 1, Array, Value) of
%     |          ^

   Compiled in 0.32s
    Running glearray_test.main
.......
7 passed, no failures

@lunagl

lunagl commented May 24, 2026

Copy link
Copy Markdown
Owner

Thank you!

@lunagl lunagl merged commit 56ed957 into lunagl:main May 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants