Issue 13 · Nov 2–8, 2026Editions · Glossary · Archive · Method · RSS · HU / ENG

News of the AI era, curated weekly

Glossary › Developer basics

exception

advancedwidespread

An exception is the program's signal that an unexpected situation has arisen during execution, preventing it from continuing its work via the usual path.

In plain terms

Imagine a baker working according to the usual recipe, and suddenly the flour runs out. They do not continue baking as if nothing happened, but stop and tell the shift supervisor. In the world of programs, this 'telling' is the exception: the program signals that something deviates from the plan.

An exception serves to ensure errors do not remain hidden. The program does not continue calculating with bad data but halts work and hands the issue over to a code section written for this specific case. This is exception handling.

If no one is prepared for the situation, the exception remains "unhandled," and the program stops. In such cases, you see an error message or a crashing application.

It comes up daily in the work of AI agents, too. A coding agent runs the program, reads the exception text, and works out from it what needs to be fixed.

How it works

  1. The program encounters an obstacle during an operation: for example, it cannot find the file, the network disconnects, or it needs to divide by zero.
  2. At this point, it throws an exception: it creates a small package describing the type of error, its text, and the exact location in the code where it occurred.
  3. Normal execution is interrupted, and the exception propagates backward along the call stack the program used to reach that point.
  4. If it encounters code along the way that 'catches' this type of exception, it handles the situation: retries, chooses another path, or displays a clear message.
  5. If no one catches it, the program stops and outputs the location and path of the error; this list is called a stack trace.

An everyday example

You open an app on your phone, tap a button, and the app closes silently. Behind the scenes, an unhandled exception likely occurred. If instead you see 'No internet connection, try again', the developer prepared for the situation and the program caught the exception.

Who is affected

developerIt must decide how the program should react to unexpected situations, and it searches for errors in the exception messages. → Code
entrepreneur, executivePoorly handled exceptions mean a system that stops, a lost order and an annoyed customer, in other words direct business damage.
employeeWhen working with an AI agent, the "exception" lines in the log show where the task got stuck, and this is worth reporting in the bug report. → Work & HR
everyoneBehind every frozen application and strange error message, there is likely an exception, so it is worth knowing what it means.

A common misconception

MythThe exception means the program was written poorly.
In realityThe exception is often a sign of careful design: the program noticed the problem and reported it, rather than continuing to work with an erroneous result. The issue arises if no one handles it, or if it is silently swallowed.

Limits and risks

Similar, but not the same

Related concepts

Broader

error handling, programming language, control structure

Narrower

unhandled exception, timeout

On the edge

runtime error, programhiba, debugging, stack dump, logging, collapse

A brief history

The concept of exception handling emerged in the 1960s; one early implementation was in the PL/I language introduced in 1964. The now-familiar 'try-catch' form developed in the 1970s (for example, in the CLU language) and became widespread through C++, Java, and Python. Keywords vary by language: most use try–catch, while Python uses try–except.

Where things stand

As of late 2026, it is a basic tool in most widely used programming languages, although some newer languages (such as Go and Rust) deliberately chose a different approach to error handling. Coding agents read the exception messages and fix many of the errors on their own.

Status: 2026 November

In the news

Appears in 6 Agent Age stories; the curve shows weekly occurrence in the news magazine.

Also known as

exception · exception · exception handling · exception handling · unhandled exception · unhandled exception · throws an exception · try-catch

Sources

This entry was machine-edited and has undergone machine expert review; the “In the news” section updates automatically from Agent Age stories.