Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the new stacktrace syntax #11

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

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