Stacktrace_compat: get_stacktrace() compatibility on OTP 21

Hi forum,

I’m pleased to announce the release of stacktrace_compat 1.0, a workaround for the deprecation of erlang:get_stacktrace() in Erlang/OTP 21.

It intends on smoothing near-future maintenance of projects that are to support both pre- and post-deprecation code by avoiding code duplication or ungainly macros.

It replaces calls to :get_stacktrace() with references to bindings (whether explicit or implicit) that capture the stacktrace using the new syntax.


stacktrace_compat 1.0.1 released.


  • unsafe use of stacktrace variables exported from previous try-catch blocks

Full change log here.

1 Like