redding / assert

Assertion style testing framework.
https://github.com/redding/assert
MIT License
10 stars 1 forks source link

prefer raising Exceptions with custom backtrace over manually setting #285

Closed kellyredding closed 6 years ago

kellyredding commented 6 years ago

This is just a small cleanup to prefer using the idiomatic raise method to raise custom exceptions with custom backtraces instead of manually raising a pre-built exception with a manually set backtrace. This addresses issue 260.

I also chose to update the custom exception tests to formally test the exception message and backtrace (in some way at least) to help ensure this change didn't introduce any regressions.

Finally, this does a few other minor cleanups: switch to not rescuing Exception in the context/stub tests and removing a use of protected, in the stub implementation.

Closes #260.

@jcredding ready for review.