Defensive Programming

Kind: principle

Layer: Correctness Core

Record: architecture:defensive-programming

Severity: mandatory

Scope: function, module, boundary

Canonical: Ontology

A design rule that code checks its inputs and assumptions before acting on them, and reports a violation as an explicit error.

Listed in Architecture principles, after Competing Consumers and before Fail Fast.

Requires

Reinforces

Enables

Conflicts with

In tension with

Tensions

Violated by

Refactored by

Severity

Category

Linked from