question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

doesNotThrow swallows stacktrace info

See original GitHub issue

Given a method that possibly throws an exception, I get the following stacktrace by wrapping it inside doesNotThrow:

AssertionError: expected [Function] to not throw an error but 'AssertionError: expected [<...>] to be a function' was thrown
at Context.<method> (<file>:<line>:<char>)

if I just run the function without wrapping it

<Class> <method>:
AssertionError: expected [<...>] to be a function
  at <Class>.<method> (<file>:<line>:<char>) <----------This line is missing from above
  at <Context>.<method> (<file>:<line>:<char>)

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:14 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
keithamuscommented, Jun 13, 2018

Thanks everyone for input on this issue!

We’ve added this to our Roadmap https://github.com/chaijs/chai/projects/2! We’ll be releasing chai 5 soon, but for now I’ll close this issue because it is tracked on our roadmap.

1reaction
meebercommented, Jun 24, 2016

@keithamus This one isn’t closed by it. There’s actually a couple posts between @lucasfcosta and I near the bottom of https://github.com/chaijs/chai/pull/683 where we list which ones can be closed. 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rescuing a swallowed Exception in Java - Stack Overflow
You can do it without reflection or AOP. The main idea is to throw another (unchecked) exception in the constructor of SomeException ....
Read more >
Schema stitching swallows original error stack traces from the ...
But in this merge step, the schema stiching swallows the original error so it's almost impossible to debug an error (no stack trace)....
Read more >
Exceptions Rule Set | Detekt
Rules in this rule set report issues related to how code throws and handles ... This rule reports code that tries to print...
Read more >
PowerShell: Everything you wanted to know about exceptions
Index. Index; Basic terminology. Exception; Throw and Catch; The call stack; Terminating and non-terminating errors; Swallowing an exception.
Read more >
ERR01-J. Do not allow exceptions to expose sensitive ...
Failure to filter sensitive information when propagating exceptions often results ... the exception's message and stack trace are displayed on the console; ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found