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.

Consolidate error handling across different sorts of Actions

See original GitHub issue

Currently an exception thrown in a coroutine (a method returning either IEnumerable<IResult>, Task or Task<>) when invoked through Message.Attach has it’s exceptions handled in Coroutine, any exceptions would appear in Coroutine.Completed.

This also affects the event aggregator with IHandleWithCoroutine and IHandleWithTask.

I consider this a potential issue because of the following

// Exception raised in Application.UnhandledException.
public void SampleMethod() { throw new InvalidOperationException(); }

// Exception raised in Coroutine.Completed
public Task SampleMethod() { throw new InvalidOperationException(); }

We could resolve this in two ways.

  1. Have Coroutine.Completed raise an unhandled exception event.
  2. Have Coroutine.Completed throw an exception on error.
  3. Do nothing but add some documentation.

If there is any change I’d like to get this into 3.0.0 as it suddenly cause new exceptions if they were previously being swallowed.

Thoughts?

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
soltraccommented, May 15, 2019

Any idea when is this going to be handled?

0reactions
nigel-sampsoncommented, Jun 6, 2017

Just posted a reply on the question, while it doesn’t look to be caused by this it certainly has something to consider when doing this work.

Ideally I think making the error handling separate from any current event means we can pipe all of the errors to the same place.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Building an Error Handling Layer in React - Semaphore CI
This allows you to consolidate error handling logic into a single layer of the React application architecture, making the debugging easier.
Read more >
Advanced error handling techniques
This post describes some (more) advanced error handling techniques. I'll probably do a series because this topic is large and there's quite ...
Read more >
Consolidating Error Handling in Nuxt.js Apps
A better approach for handling Axios errors in Nuxt.js web applications. Plus a free package you can use in your own web projects!...
Read more >
What are you using for error handling? : r/rust
There are generally two different types of workflows: You want to actually handle the error and do different stuff depending on what went ......
Read more >
Best Practices for Node.js Error-handling
Here is one of my favorite solutions for that. Node.js Error-handling: Error Types. First of all, it is necessary to have a clear...
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