This is an automated email from the ASF dual-hosted git repository.
git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/groovy-dev-site.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 497fc8c 2026/03/26 03:54:59: Generated dev website from
groovy-website@155a9bf
497fc8c is described below
commit 497fc8ceca72d75cf7ebbf8033fba19496464b72
Author: jenkins <[email protected]>
AuthorDate: Thu Mar 26 03:54:59 2026 +0000
2026/03/26 03:54:59: Generated dev website from groovy-website@155a9bf
---
blog/groovy-async-await.html | 29 +++++++++++++++++++++++++----
search/search-index.json | 2 +-
2 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/blog/groovy-async-await.html b/blog/groovy-async-await.html
index 012c34e..40c71de 100644
--- a/blog/groovy-async-await.html
+++ b/blog/groovy-async-await.html
@@ -209,10 +209,31 @@ flow reads inside-out.</p>
</div>
<div class="paragraph">
<p>Variables are declared at the point of use. The return value is
-obvious. No callbacks, no lambdas, no chained combinators. Standard
-<code>try</code>/<code>catch</code> works — and <code>await</code>
automatically unwraps
-<code>CompletionException</code>, so you catch the <em>original</em> exception
type,
-not a wrapper.</p>
+obvious. No callbacks, no lambdas, no chained combinators.</p>
+</div>
+<div class="paragraph">
+<p>What about the <code>.exceptionally(e → Quest.DEFAULT)</code>
fallback from
+the Java version? With <code>async</code>/<code>await</code>, it’s just
a <code>try</code>/<code>catch</code>:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="prettyprint highlight"><code data-lang="groovy">async Quest
loadHeroQuest(String loginToken) {
+ try {
+ var heroId = await lookupHeroId(loginToken)
+ var heroClass = await fetchHeroClass(heroId)
+ return await loadActiveQuest(heroClass)
+ } catch (NoActiveQuestException e) {
+ return Quest.DEFAULT
+ }
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p><code>await</code> automatically unwraps <code>CompletionException</code>,
so you catch
+the <em>original</em> exception type — <code>NoActiveQuestException</code>
here, not
+a <code>CompletionException</code> wrapper. Error handling reads exactly like
+synchronous code — no separate <code>.exceptionally()</code> callback bolted
+on at the end of a chain.</p>
</div>
</div>
</div>
diff --git a/search/search-index.json b/search/search-index.json
index 29c827f..97168b3 100644
--- a/search/search-index.json
+++ b/search/search-index.json
@@ -254,7 +254,7 @@
{
"id": "blog/groovy-async-await.html",
"title": "The Apache Groovy programming language - Blogs - Async/await
for Groovy",
- "content": "The Apache Groovy programming language - Blogs -
Async/await for Groovy Socialize Discuss on the mailing list Groovy on X Groovy
on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source
code on GitHub Report issues in Jira Stack Overflow questions Slack Community
You are using an outdated browser. Please upgrade your browser to improve your
experience. Apache Groovy™ Learn Documentation Download Support
Contribute Ecosystem Blog posts Socia [...]
+ "content": "The Apache Groovy programming language - Blogs -
Async/await for Groovy Socialize Discuss on the mailing list Groovy on X Groovy
on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source
code on GitHub Report issues in Jira Stack Overflow questions Slack Community
You are using an outdated browser. Please upgrade your browser to improve your
experience. Apache Groovy™ Learn Documentation Download Support
Contribute Ecosystem Blog posts Socia [...]
"url": "blog/groovy-async-await.html",
"site": "dev"
},