# Exception handling

Published articles for Exception handling.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Stop Using Try-Catch Everywhere: Better Exception Handling in .NET

DevFeed: [Stop Using Try-Catch Everywhere: Better Exception Handling in .NET](<https://devfeed.tech/articles/stop-using-try-catch-everywhere-better-exception-handling-in-net-146531.md>)

Original publisher: [Read original article](<https://blog.devops.dev/stop-using-try-catch-everywhere-better-exception-handling-in-net-6c33917bce3a?source=rss----33f8b2d9a328---4>)

Author: Bharat Chandera

Published: 2026-11-20T12:30:30Z

Content type: article

Language: en

Sources: [DevOps.dev](<https://devfeed.tech/sources/devops-dev.md>)

Topics: [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [Error Handling](<https://devfeed.tech/topics/error-handling.md>), [Exception](<https://devfeed.tech/topics/exception.md>), [.NET](<https://devfeed.tech/topics/net.md>), [Custom exceptions](<https://devfeed.tech/topics/custom-exceptions.md>), [Null-Safety](<https://devfeed.tech/topics/null-safety.md>)

Tags: [asp-net](<https://devfeed.tech/tags/asp-net.md>), [asp-net-core](<https://devfeed.tech/tags/asp-net-core.md>), [aspnetcore](<https://devfeed.tech/tags/aspnetcore.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [business-logic](<https://devfeed.tech/tags/business-logic.md>), [clean-code](<https://devfeed.tech/tags/clean-code.md>), [csharp](<https://devfeed.tech/tags/csharp.md>), [dotnet](<https://devfeed.tech/tags/dotnet.md>), [exception](<https://devfeed.tech/tags/exception.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [middleware](<https://devfeed.tech/tags/middleware.md>), [net](<https://devfeed.tech/tags/net.md>)

### AI overview

Catching every exception and returning `BadRequest(ex.Message)` can make a .NET application harder to maintain, debug, and operate. The excerpt illustrates that APIs encounter distinct failures--database connection errors, missing records, payment timeouts, business-rule violations, and unexpected null references--but does not include the article's proposed handling approach.

### Source excerpt

Catching every exception doesn't make your application safer. Learn how to build clean, centralized, and reliable exception handling in... Continue reading on DevOps.dev "

## Agentic AI repeats same old enterprise adoption cycle

DevFeed: [Agentic AI repeats same old enterprise adoption cycle](<https://devfeed.tech/articles/agentic-ai-repeats-same-old-enterprise-adoption-cycle-146087.md>)

Original publisher: [Read original article](<https://www.infoworld.com/article/4249734/agentic-ai-repeats-same-old-enterprise-adoption-cycle.html>)

Author: David Linthicum

Published: 2026-11-20T09:00:00Z

Content type: opinion

Language: en

Sources: [InfoWorld](<https://devfeed.tech/sources/infoworld.md>)

Topics: [Agentic AI](<https://devfeed.tech/topics/what-is-agentic-ai.md>), [Enterprise Architecture](<https://devfeed.tech/topics/enterprise-architecture.md>), [AI Integration Strategies](<https://devfeed.tech/topics/ai-integration-strategies.md>), [agentic workflows](<https://devfeed.tech/topics/agentic-workflows.md>), [business logic](<https://devfeed.tech/topics/business-logic.md>), [API Governance](<https://devfeed.tech/topics/api-governance.md>), [observability](<https://devfeed.tech/topics/observability.md>), [LLM security](<https://devfeed.tech/topics/llm-security.md>)

Tags: [adoption](<https://devfeed.tech/tags/adoption.md>), [agentic](<https://devfeed.tech/tags/agentic.md>), [agentic-ai](<https://devfeed.tech/tags/agentic-ai.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-agents](<https://devfeed.tech/tags/ai-agents.md>), [apis](<https://devfeed.tech/tags/apis.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [artificial-intelligence](<https://devfeed.tech/tags/artificial-intelligence.md>), [artificial-intelligence-emerging-technology-generative-ai](<https://devfeed.tech/tags/artificial-intelligence-emerging-technology-generative-ai.md>), [automate](<https://devfeed.tech/tags/automate.md>), [complexity](<https://devfeed.tech/tags/complexity.md>), [cost](<https://devfeed.tech/tags/cost.md>), [costs](<https://devfeed.tech/tags/costs.md>), [data](<https://devfeed.tech/tags/data.md>), [decision](<https://devfeed.tech/tags/decision.md>), [emerging-technology](<https://devfeed.tech/tags/emerging-technology.md>), [enterprise](<https://devfeed.tech/tags/enterprise.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [generative-ai](<https://devfeed.tech/tags/generative-ai.md>), [guardrails](<https://devfeed.tech/tags/guardrails.md>), [language-en](<https://devfeed.tech/tags/language-en.md>), [logging](<https://devfeed.tech/tags/logging.md>), [observability](<https://devfeed.tech/tags/observability.md>), [production](<https://devfeed.tech/tags/production.md>), [project](<https://devfeed.tech/tags/project.md>), [storytype-opinion](<https://devfeed.tech/tags/storytype-opinion.md>)

### AI overview

A distributor's agentic AI sales system ran successfully, but after supporting integration, governance, security, testing and operational costs were included, it cost roughly 20 times as much as a traditional architecture for about the same ROI. The article argues that agents are most useful when work requires interpretation, adaptation and semi-autonomous action; stable, rules-based or highly regulated workflows may be served more economically by conventional applications, workflow engines, rules or API integration. It recommends starting with measurable business value and assessing production costs and governance needs rather than adopting an architecture because it is fashionable. The text compares this adoption pattern with SOA, microservices and cloud-native systems, each of which can deliver benefits but also impose complexity when used without a fitting need or organizational maturity.

### Source excerpt

The pitch sounded perfect. A large regional distributor needed to build a new sales transaction management system. The goal was straightforward: automate parts of order intake, discount approvals, exception handling, customer communications, and inventory checks. It was not a trivial system, but it was also something the industry had built before. Then the vendor presentations began. Every software provider seemed to have a new agentic AI story. Their platforms had agents that could make decisions, orchestrate workflows, interpret customer intent, route exceptions, and learn from business context. One vendor described its offering as a common LLM brain that could make decisions as if the company had hired 10,000 experts, except those experts were not on the payroll. That line was from an actual sales pitch, and it landed well in the boardroom. The company decided to go agentic. The architecture would use AI agents to manage decision flows, invoke tools, check policies, interact with enterprise systems, and escalate only when needed. It looked modern. It looked strategic. It looked like the future. Then reality arrived. Building the system required far more integration work than expected. Each agent needed access to clean data, governed APIs, business rules, security controls, observability, exception handling, and human override mechanisms. The team had to build guardrails around decisions, logging around reasoning, test harnesses for unpredictable outcomes, and new operational processes for things traditional systems handled more predictably. Costs ballooned. Security reviews took longer. Operational complexity increased. The project ultimately ran fine once in production, but six months later, the company realized the uncomfortable truth: the system cost roughly 20 times more than a traditional architecture would have cost when all supporting complexity was included, and it delivered about the same ROI. I am hearing versions of this story once or twice a week from

## NetWasm 0.10 Speeds Up C# on WebAssembly, Now Faster Than Mono AOT

DevFeed: [NetWasm 0.10 Speeds Up C# on WebAssembly, Now Faster Than Mono AOT](<https://devfeed.tech/articles/netwasm-0-10-speeds-up-c-on-webassembly-now-faster-than-mono-aot-142922.md>)

Original publisher: [Read original article](<https://www.infoq.com/news/2026/11/NetWasm-0-10-Faster/>)

Author: Edin Kapić

Published: 2026-11-19T09:00:00Z

Content type: news

Language: en

Sources: [InfoQ](<https://devfeed.tech/sources/infoq.md>)

Topics: [WebAssembly](<https://devfeed.tech/topics/web-assembly.md>), [inlining](<https://devfeed.tech/topics/inlining.md>), [vectorization techniques](<https://devfeed.tech/topics/vectorization-techniques.md>), [Exception](<https://devfeed.tech/topics/exception.md>), [toolchain](<https://devfeed.tech/topics/toolchain.md>)

Tags: [aot](<https://devfeed.tech/tags/aot.md>), [arithmetic](<https://devfeed.tech/tags/arithmetic.md>), [benchmark](<https://devfeed.tech/tags/benchmark.md>), [benchmarks](<https://devfeed.tech/tags/benchmarks.md>), [c-sharp](<https://devfeed.tech/tags/c-sharp.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [desktop](<https://devfeed.tech/tags/desktop.md>), [development](<https://devfeed.tech/tags/development.md>), [dotnet](<https://devfeed.tech/tags/dotnet.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [faster](<https://devfeed.tech/tags/faster.md>), [mono](<https://devfeed.tech/tags/mono.md>), [net](<https://devfeed.tech/tags/net.md>), [net-11](<https://devfeed.tech/tags/net-11.md>), [netwasm-0-10-faster](<https://devfeed.tech/tags/netwasm-0-10-faster.md>), [news](<https://devfeed.tech/tags/news.md>), [simd](<https://devfeed.tech/tags/simd.md>), [wasi](<https://devfeed.tech/tags/wasi.md>), [webassembly](<https://devfeed.tech/tags/webassembly.md>)

### AI overview

NetWasm 0.10's compiler optimizations made it faster than Mono AOT on the project's benchmark set: across 2,213 cases, version 0.10.8 at O3 with NetWasmGC took 0.41 times Mono AOT's time as a geometric mean, excluding five cases where Mono's LLVM removed the work. Changes across releases 0.10.1-0.10.8 included shared exception handling, inlining and redundant bounds-check removal, 128-bit WebAssembly SIMD with scalar fallback, and reuse of division results for remainder and range checks. The excerpt reports gains on quicksort, DoomSharp, and a vectorized fluid-equation solver, while desktop .NET 11 RC3 remained faster overall at 0.87 times NetWasm's time. Results used Wasmtime 49.0.3 on one Apple M1 Max; the authors note measurement sensitivity to function alignment, slower vector performance than desktop .NET, specific slow operations, and a NewtR regression.

### Source excerpt

Summary: NetWasm, an ahead-of-time compiler from C# to WebAssembly, has reworked exception handling, bounds-check elimination, SIMD and division in its 0.10 series. Across more than 2000 benchmark cases, the project reports running in 0.41 times the time of Mono AOT's WASI build. By Edin Kapić

## How Specification Explicitness Shapes Failure in LLM-Generated Code

DevFeed: [How Specification Explicitness Shapes Failure in LLM-Generated Code](<https://devfeed.tech/articles/how-specification-explicitness-shapes-failure-in-llm-generated-code-137546.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.20195>)

Author: Elmira Onagh, Maleknaz Nayebi

Published: 2026-11-17T05:00:00Z

Content type: news

Language: en

Sources: [arXiv: Artificial Intelligence](<https://devfeed.tech/sources/arxiv-artificial-intelligence.md>), [arXiv: Software Engineering](<https://devfeed.tech/sources/arxiv-software-engineering.md>)

Topics: [Spec Driven Development](<https://devfeed.tech/topics/spec-driven-development.md>), [Specifications](<https://devfeed.tech/topics/specifications.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>)

Tags: [behavior](<https://devfeed.tech/tags/behavior.md>), [code](<https://devfeed.tech/tags/code.md>), [constraint](<https://devfeed.tech/tags/constraint.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-se](<https://devfeed.tech/tags/cs-se.md>), [developers](<https://devfeed.tech/tags/developers.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [experiment](<https://devfeed.tech/tags/experiment.md>), [failure](<https://devfeed.tech/tags/failure.md>), [failures](<https://devfeed.tech/tags/failures.md>), [invariant](<https://devfeed.tech/tags/invariant.md>), [invariants](<https://devfeed.tech/tags/invariants.md>), [llm](<https://devfeed.tech/tags/llm.md>), [llms](<https://devfeed.tech/tags/llms.md>), [python](<https://devfeed.tech/tags/python.md>), [regressions](<https://devfeed.tech/tags/regressions.md>), [requirements](<https://devfeed.tech/tags/requirements.md>), [specification](<https://devfeed.tech/tags/specification.md>), [specifications](<https://devfeed.tech/tags/specifications.md>)

### AI overview

In a controlled study with 72 participants implementing and revising Python tasks with an LLM, lightweight specification structure reduced hidden-test failures by 8.7%, while explicit behavioral obligations--such as constraints, invariants, edge cases, tie-breaking, and exception handling--reduced failures by 47.2% and distinct failure modes by 20.5%. Invariant violations fell 66.1%, and unsupported assumptions fell 59.5%. After requirements changed, explicit specifications caused regressions in more submissions, but each affected submission lost less previously correct behavior. Participants without explicit obligations overestimated correctness by about 23 percentage points; with them, they produced better code and judged it more cautiously.

### Source excerpt

arXiv:2611.20195v1 Announce Type: cross Abstract: When LLMs turn requirements into code, every underspecified constraint becomes behavior that the model must decide during generation. We test when specifications move beyond structure and begin to control generated behavior. In a controlled experiment, 72 participants implemented and revised Python tasks with an LLM under three levels of specification explicitness. The results show a clear break between lightweight structure and explicit behavioral obligations. Lightweight structure reduced hidden-test failures by only 8.7%. Requiring participants to specify constraints, invariants, negative requirements, edge cases, tie-breaking rules, and exception handling cut failures by 47.2% and reduced the number of distinct failure modes by 20.5%. The largest drops were in failure modes tied to implicit obligations. Invariant violations fell by 66.1%, and unsupported assumptions fell by 59.5%. After a requirement change, specifications with explicit behavioral obligations produced regressions in more submissions, but each affected submission lost less previously correct behavior. Explicit specifications also changed how developers judged generated code. Without explicit obligations, participants overestimated generated-code correctness by about 23 percentage points. With explicit obligations, they produced better code but judged it more cautiously. Thus, the lesson is sharper than "better specifications help." Lightweight structure barely helped, while explicit behavioral obligations nearly halved failures, made regressions shallower, and improved calibration.

## Robust Serialization with JSON and Custom Types

DevFeed: [Robust Serialization with JSON and Custom Types](<https://devfeed.tech/articles/robust-serialization-with-json-and-custom-types-100661.md>)

Original publisher: [Read original article](<https://machinelearningmastery.com/robust-serialization-with-json-and-custom-types/>)

Author: Iván Palomares Carrascosa

Published: 2026-10-26T11:00:00Z

Content type: tutorial

Language: en

Sources: [MachineLearningMastery.com](<https://devfeed.tech/sources/machinelearningmastery-com.md>)

Topics: [Data serialization](<https://devfeed.tech/topics/data-serialization.md>), [JSON](<https://devfeed.tech/topics/json.md>), [Python](<https://devfeed.tech/topics/python.md>), [Data validation](<https://devfeed.tech/topics/data-validation.md>), [Machine learning](<https://devfeed.tech/topics/machine-learning.md>)

Tags: [build](<https://devfeed.tech/tags/build.md>), [challenge](<https://devfeed.tech/tags/challenge.md>), [data-types](<https://devfeed.tech/tags/data-types.md>), [decoder](<https://devfeed.tech/tags/decoder.md>), [decoding](<https://devfeed.tech/tags/decoding.md>), [define](<https://devfeed.tech/tags/define.md>), [encoding](<https://devfeed.tech/tags/encoding.md>), [enum](<https://devfeed.tech/tags/enum.md>), [errors](<https://devfeed.tech/tags/errors.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [factory](<https://devfeed.tech/tags/factory.md>), [factory-function](<https://devfeed.tech/tags/factory-function.md>), [fail](<https://devfeed.tech/tags/fail.md>), [json](<https://devfeed.tech/tags/json.md>), [pipeline](<https://devfeed.tech/tags/pipeline.md>), [practical-python](<https://devfeed.tech/tags/practical-python.md>), [python](<https://devfeed.tech/tags/python.md>), [recovery](<https://devfeed.tech/tags/recovery.md>), [robust](<https://devfeed.tech/tags/robust.md>), [serialization](<https://devfeed.tech/tags/serialization.md>), [types](<https://devfeed.tech/tags/types.md>)

### AI overview

The excerpt outlines a Python JSON pipeline for machine learning configuration data: a `json.JSONEncoder` subclass handles types such as `datetime`, `set`, `Path`, and `Enum`, adding `__type__` markers where JSON conversion would lose type information; an `object_hook` decoder reconstructs objects and catches malformed data; and a factory function supplies defaults and supports schema migrations when loading older configurations. The excerpt describes these mechanisms but omits the code and specific results.

### Source excerpt

In this article, you will learn how to build a robust JSON serialization pipeline in Python that handles custom data types, graceful error recovery, and...

## EveryThing You Need To Know About Scala

DevFeed: [EveryThing You Need To Know About Scala](<https://devfeed.tech/articles/everything-you-need-to-know-about-scala-65415.md>)

Original publisher: [Read original article](<https://blog.devops.dev/everything-you-need-to-know-about-scala-c833fe885c44?source=rss----33f8b2d9a328---4>)

Author: Rahul Patidar

Published: 2026-10-06T13:04:28Z

Content type: article

Language: en

Sources: [DevOps.dev](<https://devfeed.tech/sources/devops-dev.md>)

Topics: [Scala](<https://devfeed.tech/topics/scala.md>), [Functional programming](<https://devfeed.tech/topics/functional-programming.md>), [class](<https://devfeed.tech/topics/class.md>), [Closure](<https://devfeed.tech/topics/closure.md>), [constructor](<https://devfeed.tech/topics/constructor.md>), [Exception](<https://devfeed.tech/topics/exception.md>), [Learning](<https://devfeed.tech/topics/learning.md>), [superclass](<https://devfeed.tech/topics/superclass.md>)

Tags: [app](<https://devfeed.tech/tags/app.md>), [block](<https://devfeed.tech/tags/block.md>), [class](<https://devfeed.tech/tags/class.md>), [classes](<https://devfeed.tech/tags/classes.md>), [closure](<https://devfeed.tech/tags/closure.md>), [design-patterns](<https://devfeed.tech/tags/design-patterns.md>), [exception](<https://devfeed.tech/tags/exception.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [factory](<https://devfeed.tech/tags/factory.md>), [frameworks](<https://devfeed.tech/tags/frameworks.md>), [function](<https://devfeed.tech/tags/function.md>), [functions](<https://devfeed.tech/tags/functions.md>), [monad](<https://devfeed.tech/tags/monad.md>), [none](<https://devfeed.tech/tags/none.md>), [nothing](<https://devfeed.tech/tags/nothing.md>), [null](<https://devfeed.tech/tags/null.md>), [packages](<https://devfeed.tech/tags/packages.md>), [recursion](<https://devfeed.tech/tags/recursion.md>), [scala](<https://devfeed.tech/tags/scala.md>), [syntax](<https://devfeed.tech/tags/syntax.md>)

### AI overview

The excerpt presents Scala interview topics through short explanations and code examples. It describes factory, singleton, and lazy initialization patterns; treating functions as values and higher-order functions; tail recursion, closures, placeholder syntax, partially applied functions, currying, purity, and anonymous functions. It also covers trait linearization in the diamond problem, monads, case class features, primary and auxiliary constructors, named Scala frameworks, exception handling without checked exceptions, BitSet, the App helper, package names, and Null, Nil, None, and Nothing. The supplied text ends mid-example in the factory pattern and is therefore an excerpt rather than evidence of the complete article.

### Source excerpt

Everyone who is a beginner in scala faces many problems and has many confusions while trying to understand important concepts in scala. In interviews, interviewers frequently ask about these concepts in Scala, and candidates are frequently unable to impress or explain these concepts to interviewers. So in today's post, I will be covering some important concepts in Scala, so whenever you go for your next interview, just read these concepts once and it will really help you to answer Scala Related Interview Questions. This post will cover the following topics: 1. Scala Design Patterns 2. First Class function 3. Higher-Order Functions 4. Tail Recursion in Scala. 5. Block of Code. 6. Closure 7. PlaceHolder Syntax: 8. Partially Applied Function: 9. Function Currying : 10. pure functions : 11. Anonymous Function: 12. Diamond Problem In scala: 13. traint in scala: 14. Monad in scala: 15. Case Classes In Scala. 16. constructors in Scala 17. Frameworks supported by Scala 18. Exception Handling in Scala 19. BitSet 20. app Class 21. Packages in Scala 22. Null, Nill, None, and Nothing in Scala Scala Design Patterns. Every time you develop some software, there are some common problems that everyone faces in his/her software engineering journey. To resolve these issues, we have some predefined general-purpose reusable solutions. These reusable solutions are nothing but design patterns. These are the types of templates that we can use as a solution whenever we encounter these issues. We have 3 kinds of design patterns in Scala. The factory design pattern: the main aim of the factory design pattern is to separate instance creation logic from the client. Here we implement instance creation logic in the factory class without exposing this logic to the client. It is used when we have multiple subclasses with one superclass and, based on the input, we need to return one of the inputs. Example trait Computer { def ram: String def hdd: String def cpu: String } case class PC(ram: String, h

## When to Choose Kotlin Over Java for Software Projects

DevFeed: [When to Choose Kotlin Over Java for Software Projects](<https://devfeed.tech/articles/stop-using-java-when-kotlin-exists-62443.md>)

Original publisher: [Read original article](<https://spin.atomicobject.com/stop-using-java-kotlin/>)

Author: Matt Soto

Published: 2026-09-30T12:00:22Z

Content type: comparison

Language: en

Sources: [Atomic Object](<https://devfeed.tech/sources/atomic-object.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Java](<https://devfeed.tech/topics/java.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-development](<https://devfeed.tech/tags/android-development.md>), [binaries](<https://devfeed.tech/tags/binaries.md>), [bytecode](<https://devfeed.tech/tags/bytecode.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [cost](<https://devfeed.tech/tags/cost.md>), [deployment](<https://devfeed.tech/tags/deployment.md>), [developers](<https://devfeed.tech/tags/developers.md>), [development](<https://devfeed.tech/tags/development.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [fantastic](<https://devfeed.tech/tags/fantastic.md>), [hosting](<https://devfeed.tech/tags/hosting.md>), [immutability](<https://devfeed.tech/tags/immutability.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [learn](<https://devfeed.tech/tags/learn.md>), [performance](<https://devfeed.tech/tags/performance.md>), [platforms-languages](<https://devfeed.tech/tags/platforms-languages.md>), [portable](<https://devfeed.tech/tags/portable.md>), [time](<https://devfeed.tech/tags/time.md>)

### AI overview

The article compares Java and Kotlin, explaining Kotlin's Java interoperability and its use in existing Java projects. It introduces Kotlin features such as coroutines, nullability, scoped functions, and improved generics, and begins discussing conditions that may make switching less beneficial.

### Source excerpt

Despite its many flaws, Java is a fantastic language for a variety of reasons. It's portable, runs on every device and hosting provider, and is easy to learn. It even has pretty good performance in many aspects due to its just-in-time compiler (which has been recently updated!). On top of that, it's also incredibly popular. [...] The post Stop Using Java When Kotlin Exists appeared first on Atomic Spin.

## Coroutine Essentials

DevFeed: [Coroutine Essentials](<https://devfeed.tech/articles/coroutine-essentials-25051.md>)

Original publisher: [Read original article](<https://typealias.com/start/kotlin-coroutines/>)

Author: author@typealias.com (Dave Leeds)

Published: 2026-08-21T00:00:00Z

Content type: article

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Tutorial](<https://devfeed.tech/topics/tutorial.md>)

Tags: [async](<https://devfeed.tech/tags/async.md>), [cancellation](<https://devfeed.tech/tags/cancellation.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [coroutine](<https://devfeed.tech/tags/coroutine.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [deferred](<https://devfeed.tech/tags/deferred.md>), [dispatcher](<https://devfeed.tech/tags/dispatcher.md>), [essentials](<https://devfeed.tech/tags/essentials.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [introduction](<https://devfeed.tech/tags/introduction.md>), [job](<https://devfeed.tech/tags/job.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [launch](<https://devfeed.tech/tags/launch.md>), [learn-to-program](<https://devfeed.tech/tags/learn-to-program.md>), [parallelism](<https://devfeed.tech/tags/parallelism.md>), [programming](<https://devfeed.tech/tags/programming.md>), [runblocking](<https://devfeed.tech/tags/runblocking.md>), [structured-concurrency](<https://devfeed.tech/tags/structured-concurrency.md>), [suspend-function](<https://devfeed.tech/tags/suspend-function.md>), [withcontext](<https://devfeed.tech/tags/withcontext.md>), [yield](<https://devfeed.tech/tags/yield.md>)

### AI overview

The excerpt introduces Kotlin coroutines as a way to handle multiple activities, such as network calls, while updating a screen. Its construction example shows Bot-1 ordering windows and doors sequentially, waiting idly for each delivery before starting another task. The passage sets up this inefficient timeline but ends before explaining how coroutines change it.

### Source excerpt

When you're on hold during a phone call, you might also check your email. While brewing coffee, you might also cook breakfast. And while driving a car, you might listen to a podcast. In the same way, sometimes it's helpful for the software that we write to do more than one thing at a time. For example, it could make two or three network calls at one time--all while updating the screen to show the progress of each call.

## Wastrel Compiles Hoot Scheme-to-WebAssembly Output

DevFeed: [Wastrel Compiles Hoot Scheme-to-WebAssembly Output](<https://devfeed.tech/articles/wastrelly-wabbits-35034.md>)

Original publisher: [Read original article](<https://wingolog.org/archives/2026/03/31/wastrelly-wabbits>)

Author: Andy Wingo

Published: 2026-03-31T20:34:23Z

Content type: article

Language: en

Sources: [wingolog](<https://devfeed.tech/sources/wingolog.md>)

Topics: [WebAssembly](<https://devfeed.tech/topics/web-assembly.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [scheme](<https://devfeed.tech/topics/scheme.md>)

Tags: [accidentally-quadratic](<https://devfeed.tech/tags/accidentally-quadratic.md>), [aot](<https://devfeed.tech/tags/aot.md>), [bigint](<https://devfeed.tech/tags/bigint.md>), [bignums](<https://devfeed.tech/tags/bignums.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compilers](<https://devfeed.tech/tags/compilers.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [exceptions](<https://devfeed.tech/tags/exceptions.md>), [gc](<https://devfeed.tech/tags/gc.md>), [gcc](<https://devfeed.tech/tags/gcc.md>), [gmp](<https://devfeed.tech/tags/gmp.md>), [hoot](<https://devfeed.tech/tags/hoot.md>), [igalia](<https://devfeed.tech/tags/igalia.md>), [library](<https://devfeed.tech/tags/library.md>), [maps](<https://devfeed.tech/tags/maps.md>), [precision](<https://devfeed.tech/tags/precision.md>), [scheme](<https://devfeed.tech/tags/scheme.md>), [standard](<https://devfeed.tech/tags/standard.md>), [tail-calls](<https://devfeed.tech/tags/tail-calls.md>), [wasm](<https://devfeed.tech/tags/wasm.md>), [wastrel](<https://devfeed.tech/tags/wastrel.md>), [webassembly](<https://devfeed.tech/tags/webassembly.md>), [whippet](<https://devfeed.tech/tags/whippet.md>)

### AI overview

The article describes recent work on Wastrel, an ahead-of-time WebAssembly compiler, including compiling output from the Hoot Scheme-to-Wasm compiler. It covers implementing bignum operations with mini-gmp and updating Hoot to use standardized WebAssembly exception handling.

### Source excerpt

Good day! Today (tonight), some notes on the last couple months of Wastrel, my ahead-of-time WebAssembly compiler. Back in the beginning of February, I showed Wastrel running programs that use garbage collection, using an embedded copy of the Whippet collector, specialized to the types present in the Wasm program. But, the two synthetic GC-using programs I tested on were just ported microbenchmarks, and didn't reflect the output of any real toolchain. In this cycle I worked on compiling the output from the Hoot Scheme-to-Wasm compiler. There were some interesting challenges! bignums When I originally wrote the Hoot compiler, it targetted the browser, which already has a bignum implementation in the form of BigInt, which I worked on back in the day. Hoot-generated Wasm files use host bigints via externref (though wrapped in structs to allow for hashing and identity). In Wastrel, then, I implemented the imports that implement bignum operations: addition, multiplication, and so on. I did so using mini-gmp, a stripped-down implementation of the workhorse GNU multi-precision library. At some point if bignums become important, this gives me the option to link to the full GMP instead. Bignums were the first managed data type in Wastrel that wasn't defined as part of the Wasm module itself, instead hiding behind externref, so I had to add a facility to allocate type codes to these "host" data types. More types will come in time: weak maps, ephemerons, and so on. I think bignums would be a great proposal for the Wasm standard, similar to stringref ideally (sniff!), possibly in an attenuated form. exception handling Hoot used to emit a pre-standardization form of exception handling, and hadn't gotten around to updating to the newer version that was standardized last July. I updated Hoot to emit the newer kind of exceptions, as it was easier to implement them in Wastrel that way. Some of the problems Chris Fallin contended with in Wasmtime don't apply in the Wastrel case: sinc

## From error-handling to structured concurrency

DevFeed: [From error-handling to structured concurrency](<https://devfeed.tech/articles/from-error-handling-to-structured-concurrency-21946.md>)

Original publisher: [Read original article](<https://blog.nelhage.com/post/concurrent-error-handling/>)

Author: Nelson Elhage

Published: 2026-03-23T15:30:00Z

Content type: opinion

Language: en

Sources: [Nelson Elhage](<https://devfeed.tech/sources/nelson-elhage.md>)

Topics: [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Error Handling](<https://devfeed.tech/topics/error-handling.md>), [Exception](<https://devfeed.tech/topics/exception.md>)

Tags: [concurrency](<https://devfeed.tech/tags/concurrency.md>), [error-handling](<https://devfeed.tech/tags/error-handling.md>), [examples](<https://devfeed.tech/tags/examples.md>), [exception](<https://devfeed.tech/tags/exception.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [structured-concurrency](<https://devfeed.tech/tags/structured-concurrency.md>)

### AI overview

This article examines how error-handling patterns based on stack unwinding and cleanup should be adapted for concurrent programs with multiple tasks. It introduces the problem of unhandled errors in concurrent execution and compares possible behaviors when one task fails.

### Source excerpt

How should we think about error-handling in concurrent programs? In single-threaded programs, we've mostly converged on a standard pattern, with a diverse zoo of implementations and concrete patterns. When an error occurs, it is propagated up the stack until we find a stack frame which is prepared to handle it. As we do so, we unwind the stack frames in-order, giving each frame the opportunity to clean up or destroy resources as appropriate.

## Kotlin Coroutines Cancellation and Exception Handling

DevFeed: [Kotlin Coroutines Cancellation and Exception Handling](<https://devfeed.tech/articles/kotlin-coroutines-cancellation-and-exception-handling-38659.md>)

Original publisher: [Read original article](<https://krossovochkin.com/posts/2026_01_11_kotlin_coroutines_cancellation_and_exception_handling/>)

Published: 2026-01-11T00:00:00Z

Content type: tutorial

Language: en

Sources: [Vasya Drobushkov](<https://devfeed.tech/sources/vasya-drobushkov.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [cancellation](<https://devfeed.tech/topics/cancellation.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>)

Tags: [cancellation](<https://devfeed.tech/tags/cancellation.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-coroutines](<https://devfeed.tech/tags/kotlin-coroutines.md>)

### AI overview

This article explains why cancellation and exception handling in Kotlin coroutines are difficult, emphasizing that the concepts are distinct but coupled. It discusses the flexibility and hidden complexity of the coroutine API and introduces explanations and best practices for learning and using these mechanisms.

### Source excerpt

Cancellation and exception handling in coroutines is by far the most complex thing I've faced during my entire career. These two things are so complicated that I sometimes ask myself how people are using such a difficult-to-use framework. I read all the possible docs that I found, many different articles, video courses, and even tried to look at the code - and still, I feel that my understanding of this topic is quite bad. When reading articles, I often thought that their structure was not good and that things were not clarified in a reasonable way. Usually, articles are just a collection of examples that show how certain combinations of suspending functions or coroutine builders will work. Learning by examples is good, but they should help with understanding core concepts so that all other situations are easy to relate to what was learned.

## GSoC 2025: ClangIR upstreaming

DevFeed: [GSoC 2025: ClangIR upstreaming](<https://devfeed.tech/articles/gsoc-2025-clangir-upstreaming-43126.md>)

Original publisher: [Read original article](<https://blog.llvm.org/posts/2025-gsoc-clangir-upstreaming/>)

Author: Amr Hesham (amrdeveloper)

Published: 2025-12-01T00:00:00Z

Content type: article

Language: en

Sources: [LLVM Project](<https://devfeed.tech/sources/the-llvm-project-blog.md>)

Topics: [LLVM](<https://devfeed.tech/topics/llvm.md>), [mlir](<https://devfeed.tech/topics/mlir.md>), [c/c++](<https://devfeed.tech/topics/c-c-plus-plus.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>)

Tags: [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [clang](<https://devfeed.tech/tags/clang.md>), [clangir](<https://devfeed.tech/tags/clangir.md>), [code](<https://devfeed.tech/tags/code.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [gsoc](<https://devfeed.tech/tags/gsoc.md>), [llvm](<https://devfeed.tech/tags/llvm.md>), [mlir](<https://devfeed.tech/tags/mlir.md>)

### AI overview

A Google Summer of Code 2025 project report describes upstreaming ClangIR, a high-level C/C++ representation implemented with MLIR between Clang's AST and LLVM IR. The work covered design improvements, built-in vector operations, complex-number operations, and C++ exception handling.

### Source excerpt

Hello everyone 👋! My name is Amr Hesham, and for Google Summer of Code 2025, I've been working on the ClangIR Upstreaming project. My mentors were Bruno Cardoso Lopes, Andy Kaylor and Erich Keane. Background ClangIR is a high-level representation in Clang that reflects aspects of the C/C++ languages and their extensions. It is implemented using MLIR and occupies a position between Clang's AST and LLVM IR. Starting from April 2024, the upstreaming process started to migrate the code from the incubator to the main LLVM repository. The ClangIR upstreaming process includes the following steps: Improve the design of ClangIR dialect operations, attributes, syntax and implementation details if needed. Align with LLVM coding standards and quality expectations. Implement missing features in the incubator and upstream it. Backport the new design/implementation from the LLVM repository to the incubator. Implement folders for ClangIR dialect operations. The goal of this project was to implement the following C/C++ features in the ClangIR project. Built-in VectorType (vector_size and ext_vector_type attributes) with operators and built-ins functions. ComplexType with operators and all -complex-range flag values to allow selecting different arithmatic calculation algorithms, for example, the SMITH, R. L. Algorithm 116: Complex division. Commun. ACM 5, 8 (1962). C++ Exception handling. What we did Over the coding period, I did the following. Builtin VectorType I have implemented support for all C/C++ operators for built-in VectorType that includes arithmetic, comparison, shifts and logical operators, also supporting using VectorType in many expressions, for example, index and ternary expression, and now we can compile C++ code successfully. Also, implemented folders for ClangIR VectorType operations to fold specific patterns. For example, in cir::VecExtractOp, if both the vector and the index are constant, we can fold that operation and replace it with the actual result. // Before

## Nim version 2.2.6 released

DevFeed: [Nim version 2.2.6 released](<https://devfeed.tech/articles/nim-version-2-2-6-released-53633.md>)

Original publisher: [Read original article](<https://nim-lang.org//blog/2025/10/31/nim-226.html>)

Published: 2025-10-31T00:00:00Z

Content type: release

Language: en

Sources: [Nim Programming Language](<https://devfeed.tech/sources/nim-programming-language.md>)

Topics: [Nim](<https://devfeed.tech/topics/nim.md>), [version](<https://devfeed.tech/topics/version.md>), [bugfixes](<https://devfeed.tech/topics/bugfixes.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [Closure](<https://devfeed.tech/topics/closure.md>), [copy](<https://devfeed.tech/topics/copy.md>), [return](<https://devfeed.tech/topics/return.md>), [Package Management](<https://devfeed.tech/topics/package-management.md>)

Tags: [2-2](<https://devfeed.tech/tags/2-2.md>), [announce](<https://devfeed.tech/tags/announce.md>), [async](<https://devfeed.tech/tags/async.md>), [bugfixes](<https://devfeed.tech/tags/bugfixes.md>), [builds](<https://devfeed.tech/tags/builds.md>), [closure](<https://devfeed.tech/tags/closure.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [copy](<https://devfeed.tech/tags/copy.md>), [download](<https://devfeed.tech/tags/download.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [install](<https://devfeed.tech/tags/install.md>), [nim](<https://devfeed.tech/tags/nim.md>), [release](<https://devfeed.tech/tags/release.md>), [return](<https://devfeed.tech/tags/return.md>), [version](<https://devfeed.tech/tags/version.md>)

### AI overview

The Nim team announces Nim 2.2.6, a patch release for the stable Nim 2.2 series containing 141 commits of bug fixes and improvements. The release updates exception handling and closure iterator transformation, enables a compiler move optimization for return field expressions, and includes installation guidance and numerous fixes.

### Source excerpt

The Nim Team is happy to announce version 2.2.6, the third patch release for our stable release, Nim 2.2. It comes six months after the 2.2.4 release and it contains 141 commits, bringing bugfixes and improvements. If you're still on Nim 1.6, take a look at the version 2.0 release article to see all the features you're missing. If you've been using Nim 2.0, the version 2.2 release article shows the improvements available in Nim 2.2. The Nim 2.2.6 changelog is available here. Highlights Exception handling combined with Nim's async is more stable than ever before as the underlying closure iterator transformation has been rewritten. The compiler is now smart enough to produce a move operation for return obj.field. Previously it performed a copy. Expect your code to run slightly faster due to this and other minor performance improvements. Installing Nim 2.2.6 Check out if the package manager of your OS already ships version 2.2.6 or install it as described here. If you have installed a previous version of Nim using choosenim, getting Nim 2.2.6 is as easy as: $ choosenim update self $ choosenim update stable NOTE: We recommend you to install and use the latest version of choosenim, v.0.8.16, available in our choosenim repo. Alternatively, you can download Nim 2.2.6 from our nightlies builds. Bugfixes Fixed "=destroy for non-var failed to compile when JS" (#24914) Fixed "{.push raises: [].} doesn't respect lexical scoping" (#23355) Fixed "Pragma block disabling warning has effect beyond block" (#21975) Fixed "missing < (less than), cmp for cstring" (#24941) Fixed "[GC] Illegal storage access when collecting cycle" (#4851) Fixed "Globals in proc with static params end up being re-initialized" (#24940) Fixed "Constructor to global variable in converter generates illegal c code" (#4594) Fixed "Compile-time regression from v2.2.4 to version-2-2/devel with global variable with unhandled exception: iterators.nim(254, 11) len(a) == L the length of the seq changed while iterating

## Medium Android App -- Migrating from Apollo Kotlin 3 to 4: Lessons Learned

DevFeed: [Medium Android App -- Migrating from Apollo Kotlin 3 to 4: Lessons Learned](<https://devfeed.tech/articles/medium-android-app-migrating-from-apollo-kotlin-3-to-4-lessons-learned-20324.md>)

Original publisher: [Read original article](<https://medium.engineering/medium-android-app-migrating-from-apollo-kotlin-3-to-4-lessons-learned-ff8d0d861cdb?source=rss----2817475205d3---4>)

Author: Pierrick CAEN

Published: 2025-10-06T08:18:42Z

Content type: article

Language: en

Sources: [Medium](<https://devfeed.tech/sources/medium.md>)

Topics: [apollo-client](<https://devfeed.tech/topics/apollo-client.md>), [experience report](<https://devfeed.tech/topics/experience-report.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Error Handling](<https://devfeed.tech/topics/error-handling.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [Android](<https://devfeed.tech/topics/android.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>), [IntelliJ IDEA](<https://devfeed.tech/topics/intellij-idea.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [apollo](<https://devfeed.tech/tags/apollo.md>), [apollo-client](<https://devfeed.tech/tags/apollo-client.md>), [cache](<https://devfeed.tech/tags/cache.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [medium](<https://devfeed.tech/tags/medium.md>), [migration](<https://devfeed.tech/tags/migration.md>), [network](<https://devfeed.tech/tags/network.md>), [performance](<https://devfeed.tech/tags/performance.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

The Medium Android migration from Apollo Kotlin 3 to 4 exposed cache misses in `watch()` calls because Apollo 4 surfaces exceptions through `ApolloResponse`, including misses that had previously gone unnoticed. The app used `FetchPolicy.CacheFirst` and watched normalized-cache changes for live UI updates. The author traced misses to faulty programmatic cache keys, switched to declarative type and field policies, and configured `__typename` on all operations. Watchers now return `Result` values and filter expected cache or network exceptions according to fetch policy, since fallback responses may follow. The migration also updated exception handling, replaced `executeV3()` with `execute()`, and removed `fetchThrows = true`. The author added a Currency scalar adapter. HTTP batching and persisted queries are described as future improvements; persisted queries require backend support.

### Source excerpt

Photo by Mario Verduzco on UnsplashMedium Android App -- Migrating from Apollo Kotlin 3 to 4: Lessons Learned In this post, I'll share my experience migrating the Medium Android app from Apollo Kotlin version 3 to version 4, including the challenges I encountered and how I solved them to improve our GraphQL implementation. Understanding Our Apollo Cache Implementation Before diving into the migration, it's important to understand how we use Apollo's cache in the Medium Android app. Our app relies heavily on Apollo's normalized cache for several critical purposes: Performance Optimization: We use FetchPolicy.CacheFirst as our default strategy, which means we always try to serve data from the cache first before making network requests. This significantly reduces loading times and provides a smooth user experience, especially when users navigate between screens that display similar content. Real-time Updates: We use Apollo's watch() functionality extensively to observe cache changes and automatically update our UI when data changes. This is particularly useful for features like: Live clap counts on posts Real-time follower updates Post viewed updates and more... Starting the Migration The initial plan was straightforward: update Apollo Kotlin from version 3 to 4. The IntelliJ plugin made this process seem simple at first glance. Key Changes in Apollo Kotlin 4 Group id / plugin id / package name: Apollo Kotlin 4 uses a new identifier (com.apollographql.apollo) for its maven group id, Gradle plugin id, and package name. This change from com.apollographql.apollo3 allows running version 4 alongside version 3 if needed. Source: Apollo Kotlin Migration Guide - Group id / plugin id / package name Exception handling: Apollo 4 has a new way of handling exceptions. Instead of throwing exceptions directly, they're now passed through ApolloResponse. Source: Apollo Kotlin Migration Guide -- Fetch errors do not throw ApolloCompositeException: In Apollo Kotlin 3, when both cache and netw

## Simplifying Resource Management in mssql-python through Context Manager

DevFeed: [Simplifying Resource Management in mssql-python through Context Manager](<https://devfeed.tech/articles/simplifying-resource-management-in-mssql-python-through-context-manager-20355.md>)

Original publisher: [Read original article](<https://devblogs.microsoft.com/python/simplifying-resource-management-in-mssql-python-through-context-manager/>)

Author: Jahnvi Thakkar

Published: 2025-09-26T09:49:51Z

Content type: tutorial

Language: en

Sources: [Microsoft Python Engineering](<https://devfeed.tech/sources/microsoft-python-engineering.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [sql-server](<https://devfeed.tech/topics/sql-server.md>), [Database](<https://devfeed.tech/topics/database.md>), [Exception](<https://devfeed.tech/topics/exception.md>)

Tags: [azure](<https://devfeed.tech/tags/azure.md>), [azure-sql](<https://devfeed.tech/tags/azure-sql.md>), [cleanup](<https://devfeed.tech/tags/cleanup.md>), [client-driver](<https://devfeed.tech/tags/client-driver.md>), [databases](<https://devfeed.tech/tags/databases.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [python](<https://devfeed.tech/tags/python.md>), [python-driver-for-azure-sql](<https://devfeed.tech/tags/python-driver-for-azure-sql.md>), [python-driver-for-sql-server](<https://devfeed.tech/tags/python-driver-for-sql-server.md>), [sql-server](<https://devfeed.tech/tags/sql-server.md>), [sql-server-2025](<https://devfeed.tech/tags/sql-server-2025.md>), [transactions](<https://devfeed.tech/tags/transactions.md>)

### AI overview

This tutorial explains context manager support in the mssql-python driver for Python applications using SQL Server and Azure SQL. It describes how context managers manage connections and cursors, commit successful transactions, roll back transactions when exceptions occur, and close connections automatically.

### Source excerpt

Reviewed by: Sumit Sarabhai and Gaurav Sharma If you've worked with databases in Python, you know the boilerplate: open a connection, create a cursor, run queries, commit or rollback transactions, close cursors and connection. Forgetting just one cleanup step can lead to resource leaks (open connections) or even inconsistent data. That's where context managers step [...] The post Simplifying Resource Management in mssql-python through Context Manager appeared first on Microsoft for Python Developers Blog.

## ESP-IDF error handling in FreeRTOS-based embedded applications

DevFeed: [ESP-IDF error handling in FreeRTOS-based embedded applications](<https://devfeed.tech/articles/esp-idf-tutorial-series-errors-13718.md>)

Original publisher: [Read original article](<https://developer.espressif.com/blog/2025/08/errors_and_logging/>)

Author: John Lee

Published: 2025-08-19T00:00:00Z

Content type: tutorial

Language: en

Sources: [Blog on Developer Portal](<https://devfeed.tech/sources/blog-on-developer-portal.md>)

Topics: [ESP-IDF](<https://devfeed.tech/topics/esp-idf.md>), [C](<https://devfeed.tech/topics/c.md>), [Embedded Systems](<https://devfeed.tech/topics/embedded-systems.md>), [Tutorial](<https://devfeed.tech/topics/tutorial.md>), [Embedded Software Dev](<https://devfeed.tech/topics/embedded-software-dev.md>), [real-time](<https://devfeed.tech/topics/real-time.md>)

Tags: [blog](<https://devfeed.tech/tags/blog.md>), [c](<https://devfeed.tech/tags/c.md>), [embedded](<https://devfeed.tech/tags/embedded.md>), [embedded-systems](<https://devfeed.tech/tags/embedded-systems.md>), [error-handling](<https://devfeed.tech/tags/error-handling.md>), [errors](<https://devfeed.tech/tags/errors.md>), [esp-idf](<https://devfeed.tech/tags/esp-idf.md>), [esp32c3](<https://devfeed.tech/tags/esp32c3.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [freertos](<https://devfeed.tech/tags/freertos.md>), [logging](<https://devfeed.tech/tags/logging.md>), [real-time](<https://devfeed.tech/tags/real-time.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

### AI overview

This tutorial explains error handling in FreeRTOS-based embedded systems. It reviews C techniques such as return codes and global error indicators, then introduces ESP-IDF's esp_err_t type and error-checking macros for more systematic error management.

### Source excerpt

This article explains error handling in FreeRTOS-based embedded systems, highlighting common C practices and their limitations. It introduces ESP-IDF's esp_err_t type and error-checking macros, demonstrating how they help manage errors systematically. It shows practical ways to implement error handling in embedded applications.

## Finally, You Can Drop the Parentheses in Python 3.14

DevFeed: [Finally, You Can Drop the Parentheses in Python 3.14](<https://devfeed.tech/articles/finally-you-can-drop-the-parentheses-in-python-3-14-20.md>)

Original publisher: [Read original article](<https://blog.abhimanyu-saharan.com/posts/finally-you-can-drop-the-parentheses-in-python-3-14>)

Author: Abhimanyu Saharan

Published: 2025-05-25T00:00:00Z

Content type: article

Language: en

Sources: [Abhimanyu Saharan](<https://devfeed.tech/sources/abhimanyu-s-blog.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [Exception](<https://devfeed.tech/topics/exception.md>)

Tags: [exception](<https://devfeed.tech/tags/exception.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [python](<https://devfeed.tech/tags/python.md>), [python-3-14](<https://devfeed.tech/tags/python-3-14.md>)

### AI overview

Python 3.14 introduces a cleaner syntax for catching multiple exceptions by allowing the parentheses to be omitted, as specified in PEP 758.

### Source excerpt

Python 3.14 simplifies exception handling with PEP 758, letting you drop parentheses when catching multiple exceptions, cleaner, consistent, and backward-safe.

## Kotlin Exception Handling: Why Singleton Exceptions are a bad idea

DevFeed: [Kotlin Exception Handling: Why Singleton Exceptions are a bad idea](<https://devfeed.tech/articles/kotlin-exception-handling-why-singleton-exceptions-are-a-bad-idea-25732.md>)

Original publisher: [Read original article](<https://blog.shreyaspatil.dev/kotlin-exception-handling-why-singleton-exceptions-are-a-bad-idea/>)

Author: Shreyas Patil

Published: 2024-09-18T12:56:49Z

Content type: article

Language: en

Sources: [Shreyas Patil's Blog](<https://devfeed.tech/sources/shreyas-patil-s-blog.md>)

Topics: [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [Exception](<https://devfeed.tech/topics/exception.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [coding](<https://devfeed.tech/tags/coding.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [exception](<https://devfeed.tech/tags/exception.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [exceptionhandling](<https://devfeed.tech/tags/exceptionhandling.md>), [exceptions](<https://devfeed.tech/tags/exceptions.md>), [java](<https://devfeed.tech/tags/java.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-beginner](<https://devfeed.tech/tags/kotlin-beginner.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [mistakes](<https://devfeed.tech/tags/mistakes.md>), [programming-blogs](<https://devfeed.tech/tags/programming-blogs.md>), [programming-tips](<https://devfeed.tech/tags/programming-tips.md>)

### AI overview

In Kotlin, a singleton exception retains the stack trace from when its instance was first created. If different repository methods later throw that same instance, the trace can point to the wrong method and mislead debugging or crash reporting. The excerpt recommends creating exception instances where stack traces matter; singleton exceptions may be acceptable for internal state or information that is not monitored at scale.

### Source excerpt

Understand why using singleton exceptions in Kotlin can be a bad practice and how it affects stack traces and debugging in your applications.

## Handling Runtime Exceptions

DevFeed: [Handling Runtime Exceptions](<https://devfeed.tech/articles/handling-runtime-exceptions-25055.md>)

Original publisher: [Read original article](<https://typealias.com/start/kotlin-exceptions/>)

Author: author@typealias.com (Dave Leeds)

Published: 2024-02-28T00:00:00Z

Content type: article

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [Exception](<https://devfeed.tech/topics/exception.md>), [Error Handling](<https://devfeed.tech/topics/error-handling.md>)

Tags: [compile](<https://devfeed.tech/tags/compile.md>), [custom-exceptions](<https://devfeed.tech/tags/custom-exceptions.md>), [errors](<https://devfeed.tech/tags/errors.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [exception-types-in-kotlin](<https://devfeed.tech/tags/exception-types-in-kotlin.md>), [exceptions](<https://devfeed.tech/tags/exceptions.md>), [handling](<https://devfeed.tech/tags/handling.md>), [introduction](<https://devfeed.tech/tags/introduction.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-programming](<https://devfeed.tech/tags/kotlin-programming.md>), [kotlin-throw-keyword](<https://devfeed.tech/tags/kotlin-throw-keyword.md>), [learn-to-program](<https://devfeed.tech/tags/learn-to-program.md>), [problems](<https://devfeed.tech/tags/problems.md>), [programming](<https://devfeed.tech/tags/programming.md>), [runtime](<https://devfeed.tech/tags/runtime.md>), [runtime-errors](<https://devfeed.tech/tags/runtime-errors.md>), [try-catch-blocks](<https://devfeed.tech/tags/try-catch-blocks.md>)

### AI overview

Kotlin programs can encounter problems at runtime that the compiler cannot detect in advance. The excerpt introduces exceptions as unexpected events that disrupt a function's intended plan and says the chapter will cover handling them; it begins an ordinal-conversion example but does not include its details.

### Source excerpt

In real life, when we decide to do something, we primarily think in terms of a successful experience. For example, if you're driving to your friend's house for dinner, you might look up the directions on a mapping app, make sure you've got enough gasoline in the car, and leave at the right time in order to arrive when dinner is hot. If everything goes according to plan, you'll arrive on time.

## GitHub Actions Runner v2.314.1: Broker fixes, Docker login retries, and improved timeout messages

DevFeed: [GitHub Actions Runner v2.314.1: Broker fixes, Docker login retries, and improved timeout messages](<https://devfeed.tech/articles/v2-314-1-75616.md>)

Original publisher: [Read original article](<https://github.com/actions/runner/releases/tag/v2.314.1>)

Published: 2024-02-27T20:33:35Z

Content type: release

Language: en

Sources: [GitHub Action Runners](<https://devfeed.tech/sources/github-action-runners.md>)

Topics: [releases](<https://devfeed.tech/topics/releases.md>), [self-hosted runner](<https://devfeed.tech/topics/self-hosted-runner.md>)

Tags: [actions](<https://devfeed.tech/tags/actions.md>), [broker](<https://devfeed.tech/tags/broker.md>), [changelog](<https://devfeed.tech/tags/changelog.md>), [contributors](<https://devfeed.tech/tags/contributors.md>), [docker](<https://devfeed.tech/tags/docker.md>), [docker-login](<https://devfeed.tech/tags/docker-login.md>), [dotnet](<https://devfeed.tech/tags/dotnet.md>), [download](<https://devfeed.tech/tags/download.md>), [exception](<https://devfeed.tech/tags/exception.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [github](<https://devfeed.tech/tags/github.md>), [github-actions](<https://devfeed.tech/tags/github-actions.md>), [job](<https://devfeed.tech/tags/job.md>), [logic](<https://devfeed.tech/tags/logic.md>), [login](<https://devfeed.tech/tags/login.md>), [organization](<https://devfeed.tech/tags/organization.md>), [process](<https://devfeed.tech/tags/process.md>), [refresh](<https://devfeed.tech/tags/refresh.md>), [release](<https://devfeed.tech/tags/release.md>), [v2](<https://devfeed.tech/tags/v2.md>)

### AI overview

Actions Runner v2.314.1 lists changes to broker exception handling and token refresh, adds retry logic for Docker login, passes RunnerOS during job acquisition, processes `snapshot` tokens, and improves step timeout messages and action result summaries. Packages are provided for Windows, macOS, and Linux across the listed architectures; Windows arm64 remains a preview and is not intended for production. Releases roll out progressively, so this version may not yet be available to every organization or repository.

### Source excerpt

## What's Changed * Prepare v2.313.0 Release by @luketomlinson in https://github.com/actions/runner/pull/3137 * Pass RunnerOS during job acquire. by @TingluoHuang in https://github.com/actions/runner/pull/3140 * Process `snapshot` tokens by @davidomid in https://github.com/actions/runner/pull/3135 * Update dotnet sdk to latest version @6.0.419 by @github-actions in https://github.com/actions/runner/pull/3158 * handle broker run service exception handling by @yaananth in https://github.com/actions/runner/pull/3163 * Add a retry logic to docker login operation by @enescakir in https://github.com/actions/runner/pull/3089 * Broker fixes for token refreshes and AccessDeniedException by @luketomlinson in https://github.com/actions/runner/pull/3161 * Remove USE_BROKER_FLOW by @luketomlinson in https://github.com/actions/runner/pull/3162 * Refresh Token for BrokerServer by @luketomlinson in https://github.com/actions/runner/pull/3167 * Better step timeout message. by @TingluoHuang in https://github.com/actions/runner/pull/3166 * Fix summaries for actions results by @SrRyan in https://github.com/actions/runner/pull/3174 ## New Contributors * @davidomid made their first contribution in https://github.com/actions/runner/pull/3135 * @enescakir made their first contribution in https://github.com/actions/runner/pull/3089 * @SrRyan made their first contribution in https://github.com/actions/runner/pull/3174 **Full Changelog**: https://github.com/actions/runner/compare/v2.313.0...v2.314.0 _Note: Actions Runner follows a progressive release policy, so the latest release might not be available to your enterprise, organization, or repository yet. To confirm which version of the Actions Runner you should expect, please view the download instructions for your enterprise, organization, or repository. See https://docs.github.com/en/enterprise-cloud@latest/actions/hosting-your-own-runners/adding-self-hosted-runners_ ## Windows x64 We recommend configuring the runner in a root folder of the

## GitHub Actions Runner v2.314.0: broker token refresh fixes, Docker login retries, and step timeout message improvements

DevFeed: [GitHub Actions Runner v2.314.0: broker token refresh fixes, Docker login retries, and step timeout message improvements](<https://devfeed.tech/articles/v2-314-0-75617.md>)

Original publisher: [Read original article](<https://github.com/actions/runner/releases/tag/v2.314.0>)

Published: 2024-02-26T18:55:36Z

Content type: release

Language: en

Sources: [GitHub Action Runners](<https://devfeed.tech/sources/github-action-runners.md>)

Topics: [releases](<https://devfeed.tech/topics/releases.md>), [self-hosted runner](<https://devfeed.tech/topics/self-hosted-runner.md>)

Tags: [broker](<https://devfeed.tech/tags/broker.md>), [changelog](<https://devfeed.tech/tags/changelog.md>), [contributors](<https://devfeed.tech/tags/contributors.md>), [docker](<https://devfeed.tech/tags/docker.md>), [docker-login](<https://devfeed.tech/tags/docker-login.md>), [dotnet](<https://devfeed.tech/tags/dotnet.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [release](<https://devfeed.tech/tags/release.md>), [retry](<https://devfeed.tech/tags/retry.md>), [retry-logic](<https://devfeed.tech/tags/retry-logic.md>), [runner](<https://devfeed.tech/tags/runner.md>), [self-hosted](<https://devfeed.tech/tags/self-hosted.md>), [service](<https://devfeed.tech/tags/service.md>), [snapshot](<https://devfeed.tech/tags/snapshot.md>), [timeout](<https://devfeed.tech/tags/timeout.md>), [token](<https://devfeed.tech/tags/token.md>), [tokens](<https://devfeed.tech/tags/tokens.md>), [update](<https://devfeed.tech/tags/update.md>), [v2](<https://devfeed.tech/tags/v2.md>), [version](<https://devfeed.tech/tags/version.md>)

### AI overview

Actions Runner v2.314.0 adds retry logic for Docker login, broker exception and token-refresh fixes, `snapshot` token processing, and a clearer step-timeout message. It also passes RunnerOS during job acquisition and updates the .NET SDK to 6.0.419. The release includes packages for Windows x64 and preview Windows arm64, macOS x64/arm64, and Linux x64/arm64/arm; Windows arm64 is explicitly not intended for production workflows. The runner uses progressive rollout, so availability may vary by enterprise, organization, or repository. For Windows, the notes recommend installing under the drive root to avoid service identity permission and long-path issues.

### Source excerpt

## What's Changed * Prepare v2.313.0 Release by @luketomlinson in https://github.com/actions/runner/pull/3137 * Pass RunnerOS during job acquire. by @TingluoHuang in https://github.com/actions/runner/pull/3140 * Process `snapshot` tokens by @davidomid in https://github.com/actions/runner/pull/3135 * Update dotnet sdk to latest version @6.0.419 by @github-actions in https://github.com/actions/runner/pull/3158 * handle broker run service exception handling by @yaananth in https://github.com/actions/runner/pull/3163 * Add a retry logic to docker login operation by @enescakir in https://github.com/actions/runner/pull/3089 * Broker fixes for token refreshes and AccessDeniedException by @luketomlinson in https://github.com/actions/runner/pull/3161 * Remove USE_BROKER_FLOW by @luketomlinson in https://github.com/actions/runner/pull/3162 * Refresh Token for BrokerServer by @luketomlinson in https://github.com/actions/runner/pull/3167 * Better step timeout message. by @TingluoHuang in https://github.com/actions/runner/pull/3166 ## New Contributors * @davidomid made their first contribution in https://github.com/actions/runner/pull/3135 * @enescakir made their first contribution in https://github.com/actions/runner/pull/3089 **Full Changelog**: https://github.com/actions/runner/compare/v2.313.0...v2.314.0 _Note: Actions Runner follows a progressive release policy, so the latest release might not be available to your enterprise, organization, or repository yet. To confirm which version of the Actions Runner you should expect, please view the download instructions for your enterprise, organization, or repository. See https://docs.github.com/en/enterprise-cloud@latest/actions/hosting-your-own-runners/adding-self-hosted-runners_ ## Windows x64 We recommend configuring the runner in a root folder of the Windows drive (e.g. "C:\actions-runner"). This will help avoid issues related to service identity folder permissions and long file path restrictions on Windows. The following snipp

## Exceptional Exception Handling

DevFeed: [Exceptional Exception Handling](<https://devfeed.tech/articles/exceptional-exception-handling-23848.md>)

Original publisher: [Read original article](<http://testing.googleblog.com/2023/12/exceptional-exception-handling.html>)

Author: Google Testing Bloggers (noreply@blogger.com)

Published: 2023-12-05T13:19:00Z

Content type: article

Language: en

Sources: [Google Testing Blog](<https://devfeed.tech/sources/google-testing-blog.md>)

Topics: [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [Exception](<https://devfeed.tech/topics/exception.md>), [Custom exceptions](<https://devfeed.tech/topics/custom-exceptions.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [code-health](<https://devfeed.tech/tags/code-health.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [exception](<https://devfeed.tech/tags/exception.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [exceptions](<https://devfeed.tech/tags/exceptions.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [language](<https://devfeed.tech/tags/language.md>), [pizza](<https://devfeed.tech/tags/pizza.md>), [python](<https://devfeed.tech/tags/python.md>), [root](<https://devfeed.tech/tags/root.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tott](<https://devfeed.tech/tags/tott.md>), [typescript](<https://devfeed.tech/tags/typescript.md>), [yiming-sun](<https://devfeed.tech/tags/yiming-sun.md>)

### AI overview

The excerpt recommends keeping `try` blocks narrow and catching only the exception a method is expected to raise. In its Java example, wrapping preparation, `bakePizza()`, and delivery in one block risks catching unrelated failures; `catch (Exception e)` is overly broad, and rethrowing without the cause loses debugging information. The revised code isolates `bakePizza()`, catches `PizzaOverbakedException`, and wraps it in a more meaningful `IllegalStateException` while preserving the original exception as its cause. The excerpt ends during the example.

### Source excerpt

This is another post in our Code Health series. A version of this post originally appeared in Google bathrooms worldwide as a Google Testing on the Toilet episode. You can download a printer-friendly version to display in your office. by Yiming Sun Have you ever seen huge exception-handling blocks? Here is an example in Java, although you may have seen similar problems in Python, TypeScript, Kotlin, or any language that supports exceptions. Let's assume we are calling bakePizza() to bake a pizza, and it can be overbaked, throwing a PizzaOverbakedException. class PizzaOverbakedException extends Exception {}; void bakePizza () throws PizzaOverbakedException {}; try { // 100+ lines of code to prepare pizza ingredients. ... bakePizza(); // Another 100+ lines of code to deliver pizza to a customer. ... } catch (Exception e) { throw new IllegalStateException(); // Root cause ignored while throwing new exception. } Here are the problems with the above code: Obscuring the logic. The method bakePizza(), is obscured by the additional lines of code of preparation and delivery, so unintended exceptions from preparation and delivery may be caught. Catching the general exception. catch (Exception e) will catch everything, despite that we might only want to handle PizzaOverbakedException here. Rethrowing a general exception, with the original exception ignored. This means that the root cause is lost - we don't know what exactly goes wrong with pizza baking while debugging. Here is a better alternative, rewritten to avoid the problems above. class PizzaOverbakedException extends Exception {}; void bakePizza () throws PizzaOverbakedException {}; // 100+ lines of code to prepare pizza ingredients. ... try { bakePizza(); } catch (PizzaOverbakedException e) { // Other exceptions won't be caught. // Rethrow a more meaningful exception; so that we know pizza is overbaked. throw new IllegalStateException("You burned the pizza!", e); } // Another 100+ lines of code to deliver pizza to a cu

## Clojure Deref (Dec 16, 2022)

DevFeed: [Clojure Deref (Dec 16, 2022)](<https://devfeed.tech/articles/clojure-deref-dec-16-2022-49595.md>)

Original publisher: [Read original article](<https://clojure.org/news/2022/12/16/deref>)

Published: 2022-12-16T00:00:00Z

Content type: article

Language: en

Sources: [Clojure News](<https://devfeed.tech/sources/clojure-news.md>)

Topics: [Clojure](<https://devfeed.tech/topics/clojure.md>), [software-development](<https://devfeed.tech/topics/software-development.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>)

Tags: [clojure](<https://devfeed.tech/tags/clojure.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [development](<https://devfeed.tech/tags/development.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [programming](<https://devfeed.tech/tags/programming.md>), [releases](<https://devfeed.tech/tags/releases.md>)

### AI overview

A weekly roundup of Clojure ecosystem news, including plans for Clojure/conj 2023, podcasts and articles on Clojure development, and new Clojure libraries and tools.

### Source excerpt

Welcome to the Clojure Deref! This is a weekly link/news roundup for the Clojure ecosystem. (@ClojureDeref RSS) Highlights In these final days of the year, we are happy to look forward to 2023 and let you know about the plans for Clojure/conj 2023, which will take place Apr 27-28 in Durham, North Carolina! A limited number of early bird tickets are available at the registration site for $350 and we also have streaming-only tickets available for $20 so everyone can join! The CFP is open NOW until January 15th and we welcome your talk submissions. Speakers receive ticket, hotel, and travel (see details on the site). The sponsor prospectus is also available if you would like to have a booth or visibility. If you have any questions, you can contact us at events@cognitect.com. Can't wait to see you all in person again! Podcasts, videos, and courses Comparing the Actor model & CSP concurrency with Elixir & Clojure | Xiang Ji | ElixirConf EU 2022 - Code Sync ActivityPub in Clojure -- Episode 3 -- Factories and WebFinger - Lambda Island Erpisode 12: A peaceful moment - Parens of the Dead Derpisode 13: Exception handling - Parens of the Dead Blogs and articles Structured logging in Clojure - valerauko Clojure multimethods and derivation - valerauko Error Model (part 2) - Miro Bezjak Clojure is in fact a trinity - of language, interactive development, and structural editing - Jakub Holý Development update - lots of new changes - Jeaye Wilkerson Datalog for json munging - Tommy Mor Dealing with circular dependencies in Clojure - valerauko Adding prompts to your Babashka scripts with dialog - A.C. Danvers Petri Plates to Parentheses: How I Became a Clojure Engineer - Abhinav Omprakash Why Flutter needs Clojure - Artur Dumchev Libraries and tools New releases and tools this week: Clojure CLI 1.11.1.1208 tools.deps 0.16.1264 - Deps as data and classpath generation tools.deps.cli 0.9.10 - Deps functions tools.tools 0.3.0 - Clojure CLI tool for managing Clojure CLI tools polylith 0.2

## I know Nothing in Kotlin

DevFeed: [I know Nothing in Kotlin](<https://devfeed.tech/articles/i-know-nothing-in-kotlin-23971.md>)

Original publisher: [Read original article](<https://medium.com/making-meetup/i-know-nothing-in-kotlin-392a85bcc3b4?source=rss----6981e268ba45---4>)

Author: Colin Lee

Published: 2022-09-16T15:32:41Z

Content type: article

Language: en

Sources: [Making Meetup - Medium](<https://devfeed.tech/sources/making-meetup-medium.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Exception](<https://devfeed.tech/topics/exception.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [typesafety](<https://devfeed.tech/topics/typesafety.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Swift](<https://devfeed.tech/topics/swift.md>)

Tags: [cancellation](<https://devfeed.tech/tags/cancellation.md>), [code](<https://devfeed.tech/tags/code.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [dns](<https://devfeed.tech/tags/dns.md>), [errors](<https://devfeed.tech/tags/errors.md>), [exception](<https://devfeed.tech/tags/exception.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [function](<https://devfeed.tech/tags/function.md>), [ios](<https://devfeed.tech/tags/ios.md>), [kmm](<https://devfeed.tech/tags/kmm.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform-mobile](<https://devfeed.tech/tags/kotlin-multiplatform-mobile.md>), [nothing](<https://devfeed.tech/tags/nothing.md>), [pairing](<https://devfeed.tech/tags/pairing.md>), [refactor](<https://devfeed.tech/tags/refactor.md>), [repository](<https://devfeed.tech/tags/repository.md>), [swift](<https://devfeed.tech/tags/swift.md>), [timeout](<https://devfeed.tech/tags/timeout.md>), [type](<https://devfeed.tech/tags/type.md>), [types](<https://devfeed.tech/tags/types.md>)

### AI overview

Kotlin's `Nothing` return type marks code that can never produce a value because it always throws or otherwise does not return. In the article's KMM repository example, a shared error handler rethrows coroutine `CancellationException`s and wraps other exceptions for Swift-facing `@Throws` declarations; declaring its return type as `Nothing` lets callers retain their actual return types. The article says this also helps the compiler and IDE flag unreachable code, and describes `LinkedList<Nothing>` for an empty generic sealed-list variant and `() -> Nothing` for Swift-style guard behavior. It argues against automatic inference because checking every branch could slow compiler and IDE checks and infer surprising types that may cause bugs.

### Source excerpt

When the Greek philosopher Socrates professed that "I know only one thing -- that I know nothing," he wasn't exactly professing ignorance. It was an ancient formulation of the Dunning-Kruger effect. He had discovered that the more he learned, the wider the expanse of human knowledge seemed and the less that it seemed he knew. A fool, on the other hand, might believe that they're "not smart, but genius... and a very stable genius at that," and that they know "only the best words." In this sense, it's a good thing to know nothing. It's also true in Kotlin. During a recent code pairing session, I discovered that in Kotlin, there are numerous developers who have written code in the language for many years. And yet, they still don't know Nothing. Our pairing session became a big fuss about Nothing. We were working on some Repository code in our shared Kotlin Multiplatform Mobile (KMM) module of our Meetup for Organizers app. In this code, there was a repeated block at the end of every repository call to handle network, DNS, and timeout errors. We decided it would make sense to refactor this block into a function as we used it so often. The repeated block in question handled a catch block. It had to re-throw any CancellationExceptions to allow cooperative cancellation of coroutines. Then we had to wrap any other exception and re-throw it as a custom exception type so that we can easily tell iOS a complete list of all types we intend to throw in a @Throws declaration. This allows exception handling and avoids crashing when our functions are called by Swift code. In essence, this code block always threw an Exception. The pairing session became quite funny, like the Laurel and Hardy "Who's on First" comedy routine, but you could tell there was Nothing more frustrating, too. It went something like this: "Why am I getting this red text at the call site?" "The return type is incorrect because you always throw an exception. You need to return Nothing." "I already am returning nothi

[Next page](<https://devfeed.tech/tags/exception-handling.md?cursor=WyIyMDIyLTA5LTE2VDE1OjMyOjQxKzAwOjAwIiwgIjRkODFhY2UyLTBjOTEtNGJjMC05NDM3LWNjYjgwMGMxZjNmOCJd>)