14 lines
2.4 KiB
HTML
14 lines
2.4 KiB
HTML
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>can't happen</title><link rel="stylesheet" href="../../jargon.css" type="text/css"/><meta name="generator" content="DocBook XSL Stylesheets V1.61.0"/><link rel="home" href="../index.html" title="The Jargon File"/><link rel="up" href="../C.html" title="C"/><link rel="previous" href="camelCasing.html" title="camelCasing"/><link rel="next" href="cancelbot.html" title="cancelbot"/></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">can't happen</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="camelCasing.html">Prev</a> </td><th width="60%" align="center">C</th><td width="20%" align="right"> <a accesskey="n" href="cancelbot.html">Next</a></td></tr></table><hr/></div><dt><a id="can-t-happen"/><dt xmlns="" id="can-t-happen"><b>can't happen</b></dt></dt><dd><p> The traditional program comment for code executed under a condition
|
||
that should never be true, for example a file size computed as negative.
|
||
Often, such a condition being true indicates data corruption or a faulty
|
||
algorithm; it is almost always handled by emitting a fatal error message
|
||
and terminating or crashing, since there is little else that can be done.
|
||
Some case variant of “<span class="quote">can't happen</span>” is also often the text
|
||
emitted if the ‘impossible’ error actually happens! Although
|
||
“<span class="quote">can't happen</span>” events are genuinely infrequent in production
|
||
code, programmers wise enough to check for them habitually are often
|
||
surprised at how frequently they are triggered during development and how
|
||
many headaches checking for them turns out to head off. See also
|
||
<a href="../F/firewall-code.html"><i class="glossterm">firewall code</i></a> (sense 2).</p></dd><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="camelCasing.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="../C.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="cancelbot.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">camelCasing </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> cancelbot</td></tr></table></div></body></html>
|