Introduction to Assertions and Logging

Assertions are mechanisms that print error messages and raise exceptions when a given condition in code is false. Logging prints error or informational messages, typically to the standard error device.

Organization of This Document

This programming topic covers exception handling insofar as it relates to evaluations of given conditions and the logging of messages. For more sophisticated exception handling, namely techniques involving the raising (or throwing) and handling of exception objects, see Exception Programming Topics.

The articles covered in this programming topic are: