From fa68d2fa82f82f577ff5306cd4292e5b419ad841 Mon Sep 17 00:00:00 2001 From: "igor%mir2.org" Date: Fri, 14 Feb 2003 23:47:11 +0000 Subject: [PATCH] I made Context.codeBug public so optimizer can use it. --- js/rhino/src/org/mozilla/javascript/Context.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/rhino/src/org/mozilla/javascript/Context.java b/js/rhino/src/org/mozilla/javascript/Context.java index 112bf19250f..6312d2930cc 100644 --- a/js/rhino/src/org/mozilla/javascript/Context.java +++ b/js/rhino/src/org/mozilla/javascript/Context.java @@ -2199,8 +2199,10 @@ public class Context { activationNames.remove(name); } -// Rudimentary support for Design-by-Contract - static void codeBug() { + /** + * Throws RuntimeException to indicate failed assertion. + */ + public static void codeBug() throws RuntimeException { throw new RuntimeException("FAILED ASSERTION"); }