Exceptions

Exceptions are mechanisms that bypass normal program execution flow. Although the specific details are language-specific, many modern programming languages follow the same principles.

A piece of code may signal invalid condition by raising an exception. (This is also called throwing an exception.) This exception may be a hardware exception that's generated in the hardware (on the CPU) or a software exception that's generated in the code.

Typical examples of hardware exceptions are access violations (where a program tries to access an invalid memory location) and division by zero. Software exceptions are more diverse, as they are frequently raised in different places of the Delphi runtime library. Probably the most well-known of ...

Get Hands-On Design Patterns with Delphi now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.