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.

Cancellation token in exception handlers

See original GitHub issue

We would like to use delays in our exception handlers. However currently there is no easy way to abort those delays when the subscription is terminated. Adding a CancellationToken to the delegate would fix this issue.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
IharBurycommented, Sep 12, 2017

Discussed with @dennisdoomen. We will extend SubscriptionInfo with the cancellation token. That will fix the issue with HandleException delegate. We will the issue in projector specific delegates later (or maybe we will not fix it at all there) because the Dispatcher level exception handling should be enough for most use cases.

0reactions
dennisdoomencommented, Sep 23, 2017

Don’t see any priority in this now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Cancelling a Task is throwing an exception
Throwing OperationCanceledException is the idiomatic way that "the method you called was cancelled" is expressed in TPL. Don't fight against ...
Read more >
Cancellation and catching exceptions • NServiceBus
CancellationToken property. However, it is generally preferred to not catch exceptions within message handlers and sagas, and instead let  ...
Read more >
A Deep Dive into C#'s CancellationToken | by Mitesh Shah
Listeners of the cancellation token can optionally throw this exception to verify the source of the cancellation and notify others that it has ......
Read more >
Cancellation, Part 3: Detecting Cancellation
You may also notice that OperationCanceledException has a CancellationToken property. This is the token that caused the cancellation. That is, ...
Read more >
CancellationToken.ThrowIfCancellationRequested Method
Exceptions. OperationCanceledException. The token has had cancellation requested. Remarks. This method provides functionality equivalent to: C#.
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