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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.