Glossary Updates12 new terms added to the glossaries · October 2, 2026, 22:44 CEST
AI TechDocKnowledge

Glossary · Automation software engineering and architecture

Exception handling

German: Ausnahmebehandlung

In programming, exception handling is the mechanism and practice of catching exceptions raised during program execution and responding to them in a defined way, for example by cleaning up resources, logging, retrying, falling back or passing the error on.

  • Software engineering

In one sentence

Exception handling catches runtime exceptions and responds in a defined way, such as cleaning up, logging, retrying or passing them on.

Example

The recipe service catches a file access exception, logs the path and error, keeps the last valid recipe loaded and reports a warning to the HMI.

How it applies

  • Engineering: Catch exceptions where the program can actually do something meaningful about them. Catching everything and ignoring it hides defects; letting everything propagate to the top can stop critical functions unnecessarily.
  • Real-time and embedded: Exception mechanisms can have unpredictable timing and memory use, so some embedded coding standards restrict or forbid them. PLC runtimes provide their own mechanisms, such as error tasks or try-catch extensions in some implementations.
  • Documentation: Developer documentation should describe the project's exception strategy: which layers catch which exceptions and how they are reported. Service documentation should explain the resulting messages and what to do.

Exception handling vs. error handling

Error handling is the general practice of dealing with errors by any means, including status codes and checks. Exception handling is one specific mechanism within it. See also Fail-fast behavior, a design principle that often guides where exceptions are raised.

By knowledge.aitechdoc.world · Published September 26, 2026 · Last reviewed

Source: AI TechDoc Knowledge editorial definition, based on programming language practice

Definitions follow the cited standards and specifications. Where a source is a copyrighted publication, such as an ISO, IEC or EN standard, the definition is a close paraphrase, not a verbatim quotation, so as not to infringe copyright. We recommend reading the original publication. The sections “How it applies” are editorial commentary by AI TechDoc Knowledge and are not part of any standard.

Seen a mistake? Send us a note!