Consolidate error handling across different sorts of Actions
See original GitHub issueCurrently 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.
- Have
Coroutine.Completed
raise an unhandled exception event. - Have
Coroutine.Completed
throw an exception on error. - 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:
- Created 8 years ago
- Comments:9 (7 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any idea when is this going to be handled?
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.