CAN'T HAPPEN
\kˈɑːnt hˈapən], \kˈɑːnt hˈapən], \k_ˈɑː_n_t h_ˈa_p_ə_n]\
Sort: Oldest first
-
The traditional program comment for codeexecuted under a condition that should never be true, forexample a file size computed as negative. Often, such acondition being true indicates data corruption or a faultyalgorithm; it is almost always handled by emitting a fatalerror message and terminating or crashing, since there islittle else that can be done.Some case variant of "can't happen" is also often the textemitted if the "impossible" error actually happens. Although"can't happen" events are genuinely infrequent in productioncode, programmers wise enough to check for them habitually areoften surprised at how frequently they are triggered duringdevelopment and how many headaches checking for them turns outto head off.See also firewall code, professional programming.
By Denis Howe
Word of the day
Capparis Arborea
- small Australian tree bearing edible fruit resembling the pomegranate
Nearby Words
- can buoy
- can hook
- can of worms
- can opener
- can't
- can't happen
- can-buoys
- can-can
- can-do
- can-poisoning
- cana dtpa