Change usage of System.stacktrace into __STACKTRACE__ and make tests pass #251
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes in getting a stacktrace from a failed koan
As of Elixir 1.10, the usage of
System.stacktrace
to retrieve a stacktrace is now deprecated and is also non functional. Refer to the docs.#242 tried substituting
System.stacktrace
with Erlang's:erlang.get_stacktrace()
but it returns an empty list instead.So, I substituted the calling of
System.stacktrace
in a non rescue context when trying to report errors with a call to__STACKTRACE__
in the Koan macro itself, for normal execution and for tests, something that #242 suggested.Making the tests pass
Even then, the tests would not pass. Two tests were failing.
The failure_test.exs was providing input arguments which were not correct for the output the tests asserted.
The comprehension_koans_test.exs was out of date with respect to the koan itself.
Now the tests pass and a few koans I tried worked as well.
[closes #250]