Skip to content

Conversation

oestrich
Copy link

Hello! I've been trying out elli_websocket and I keep running into this compilation warning in OTP 24.

src/elli_ws_protocol.erl:96:63: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace
src/elli_ws_protocol.erl:99:65: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace
src/elli_ws_protocol.erl:102:63: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace
src/elli_ws_protocol.erl:173:63: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace
src/elli_ws_protocol.erl:176:65: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace
src/elli_ws_protocol.erl:179:63: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace
src/elli_ws_protocol.erl:669:63: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace
src/elli_ws_protocol.erl:671:65: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace
src/elli_ws_protocol.erl:673:63: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace

I switched to the new syntax for try/catch and the errors have gone away. I don't know if this is backwards compatible with OTP 20, or if you all even care about supporting that far back.

I've only tested this by compiling in an elixir project because I'm not real sure how to use rebar3 at the moment 😅, but the warnings are gone after this change.

Thanks for the library!

`erlang:get_stacktrace()` was deprecated in OTP 21
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.

1 participant