--- /dev/null
+/*\r
+\r
+ Derby - Class org.apache.derby.iapi.services.sanity.AssertFailure\r
+\r
+ Licensed to the Apache Software Foundation (ASF) under one or more\r
+ contributor license agreements. See the NOTICE file distributed with\r
+ this work for additional information regarding copyright ownership.\r
+ The ASF licenses this file to you under the Apache License, Version 2.0\r
+ (the "License"); you may not use this file except in compliance with\r
+ the License. You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+\r
+ */\r
+\r
+package org.apache.derby.shared.common.sanity;\r
+\r
+import java.io.*;\r
+\r
+/**\r
+ * AssertFailure is raised when an ASSERT check fails.\r
+ * Because assertions are not used in production code,\r
+ * are never expected to fail, and recovering from their\r
+ * failure is expected to be hard, they are under\r
+ * RuntimeException so that no one needs to list them\r
+ * in their throws clauses. An AssertFailure at the\r
+ * outermost system level will result in system shutdown.\r
+ **/\r
+public class AssertFailure extends RuntimeException\r
+{\r
+ /**\r
+ * This constructor takes the pieces of information\r
+ * expected for each error.\r
+ *\r
+ * @param message the message associated with\r
+ * the error.\r
+ *\r
+ * @param nestedError errors can be nested together;\r
+ * if this error has another error associated with it,\r
+ * it is specified here. The 'outermost' error should be\r
+ * the most sever error; inner errors should be providing\r
+ * additional information about what went wrong.\r
+ **/\r
+ public AssertFailure(String message, Throwable nestedError)\r
+ {\r
+ super(message, nestedError);\r
+ }\r
+\r
+ /**\r
+ * This constructor expects no arguments or nested error.\r
+ **/\r
+ public AssertFailure(String message)\r
+ {\r
+ super(message);\r
+ }\r
+}\r