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.

SwallowWebExceptions is being changed to true

See original GitHub issue

Hi (great job on this project!) I have a Twitter service class that sets ExceptionHandler.SwallowWebExceptions = false; in its constructor.

One of the methods has the following: var userCredentials = new TwitterCredentials(Credentials.ConsumerKey, Credentials.ConsumerSecret, accessToken, accessSecret);

var result = await Auth.ExecuteOperationWithCredentials(userCredentials, () => TwitterAccessorAsync.ExecutePOSTQuery<IUserDTO>(string.Format(USERS_SHOW, handle)));

Before the call to Auth.ExecuteOperationWithCredentials() I can confirm that SwallowWebExceptions is set to false but immediately after executing it is already set to true and the surrounding generic try catch doesn’t catch anything. (I know the method should be a GET, this is just so I can easily force an exception).

Checking the last exception from ExceptionHandler has the exception I want to catch. I’ve read around the wiki but I can’t seem to find what I am doing wrong. Any help would be appreciated, thanks in advance!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
linvicommented, May 4, 2017

Thanks for reporting this issue. It looks like a bug that I will fix in the coming release.

0reactions
linvicommented, Jun 15, 2017

Verified on all platforms 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rescuing a swallowed Exception in Java
You can do it without reflection or AOP. The main idea is to throw another (unchecked) exception in the constructor of SomeException ....
Read more >
Do Not Swallow The Exceptions | Justin James
Throwing away exceptions in your code is just a bad practice and makes it harder to support your application. It may make it...
Read more >
Would you PLEASE stop swallowing exceptions on event ...
Hello, I have some logic that executes within a RowUpdated event. It worked just fine, until recently. Users started reporting incorrect ...
Read more >
Exception swallowed if thrown from OnNext invoked by ...
What we expect in that scenario is that, because nothing catches the exception, it bubbles up to the application level handler and terminates ......
Read more >
Don't swallow exceptions when they are translated with ...
Exception protocol is raised, nothing is logged - only the status code is changed. Unfortunately that means we're throwing away a lot of ......
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