safwank / ElixirRetry

Simple Elixir macros for linear retry, exponential backoff and wait with composable delays
Other
441 stars 32 forks source link

exception stacktrace in else block #38

Closed lowang closed 4 years ago

lowang commented 4 years ago

Hi

I was wondering about proper stacktrace inside else block, calling System.stacktrace() is producing deprecation warning. I'm using sentry.io for error reporting. I can craft some PR but I would like to consult first what would you suggest?

safwank commented 4 years ago

Hi. Thanks for reporting this. Let me look into it and get back to you.

hoyon commented 4 years ago

Isn't this just a matter of replacing https://github.com/safwank/ElixirRetry/blob/master/lib/retry.ex#L227 with

reraise e, __STACKTRACE__
safwank commented 4 years ago

@hoyon Thanks for that.

@lowang I've just released https://github.com/safwank/ElixirRetry/releases/tag/v0.14.1 which replaces the deprecated function with __STACKTRACE__.