@@ -0,0 +1,2122 @@
+/*%0A * $Id: ShouldNotHappenException.java,v 1.1 2011-11-15 21:38:44 barry409 Exp $%0A */%0A%0A/*%0A%0ACopyright (c) 2011 Board of Trustees of Leland Stanford Jr. University,%0Aall rights reserved.%0A%0APermission is hereby granted, free of charge, to any person obtaining a copy%0Aof this software and associated documentation files (the %22Software%22), to deal%0Ain the Software without restriction, including without limitation the rights%0Ato use, copy, modify, merge, publish, distribute, sublicense, and/or sell%0Acopies of the Software, and to permit persons to whom the Software is%0Afurnished to do so, subject to the following conditions:%0A%0AThe above copyright notice and this permission notice shall be included in%0Aall copies or substantial portions of the Software.%0A%0ATHE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR%0AIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,%0AFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL%0ASTANFORD UNIVERSITY BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,%0AWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR%0AIN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.%0A%0AExcept as contained in this notice, the name of Stanford University shall not%0Abe used in advertising or otherwise to promote the sale, use or other dealings%0Ain this Software without prior written authorization from Stanford University.%0A%0A*/%0A%0Apackage org.lockss.daemon;%0A%0A/** %3Cp%3EThrown when a situation is detected that should never occur,%0A  * such as an internal consistency check that can fail only as a%0A  * result of a programming error.  This exception is not expected to%0A  * be handled other than by terminating the affected process or%0A  * computation.%3C/p%3E%0A  */%0Apublic class ShouldNotHappenException extends RuntimeException %7B%0A%0A  public ShouldNotHappenException() %7B%0A    super();%0A  %7D%0A%0A  public ShouldNotHappenException(String msg) %7B%0A    super(msg);%0A  %7D%0A%0A  public ShouldNotHappenException(Throwable cause) %7B%0A    super(cause);%0A  %7D%0A%0A  public ShouldNotHappenException(String msg, Throwable cause) %7B%0A    super(msg, cause);%0A  %7D%0A%7D%0A

Add a RuntimeException to be thrown for never-happens sanity checks and detected programming errors.