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.

Clarify handling exceptions during async events

See original GitHub issue

The specification has a chapter on this but it is IMO not entirely clear because it only covers the case where more than one exception is thrown.

The TCK likewise only covers such scenario, see https://github.com/eclipse-ee4j/cdi-tck/tree/master/impl/src/main/java/org/jboss/cdi/tck/tests/event/observer/async/handlingExceptions

We should change the chapter title to something like Handling exceptions thrown during an asynchronous event and in the text we need to either explicitly state that the cause is always CompletionException or just mention what happens in case there is only one exception.

Afterwards, we should add a TCK test for it.

Note that this was originally brought up in Quarkus issue - https://github.com/quarkusio/quarkus/issues/24646

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
starksm64commented, Apr 1, 2022

No as this is not a new issue. It is simply additional test coverage that can be rolled into the next TCK update.

0reactions
Emily-Jiangcommented, Mar 31, 2022

Does this require another respin of the release? If yes, I will need to withdraw the ballot again. please let me asap.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Catch an Exception from an async Event Handler
An async void method will throw it's exceptions on its captured context your try catch should be within the async method.
Read more >
Async/Await - Best Practices in Asynchronous Programming
Async Task methods enable easier error-handling, composability and testability. The exception to this guideline is asynchronous event handlers, which must ...
Read more >
Curious Case of Exceptions in Async Methods — Part 2
The exception handling behavior of async method has several subtleties and pitfalls to be aware of. In this post we discussed the idiosyncrasies ......
Read more >
Exception Handling in C# Asynchronous Programming
This is the solution to catch exceptions in asynchronous methods. Have a look at the following code. If you look closely inside the...
Read more >
Async/Await Error Handling - Beginner JavaScript - Wes Bos
We will cover 4 different ways that you can do error handling in async await , and then Wes will explain which approach...
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