1 // © 2016 and later: Unicode, Inc. and others. 2 // License & terms of use: http://www.unicode.org/copyright.html#License 3 /* 4 ******************************************************************************* 5 * Copyright (C) 2005-2006, International Business Machines 6 * Corporation and others. All Rights Reserved. 7 ******************************************************************************* 8 */ 9 package com.ibm.icu.impl; 10 11 // 1.3 compatibility layer 12 public class Assert { fail(Exception e)13 public static void fail(Exception e) { 14 fail(e.toString()); // can't wrap exceptions in jdk 1.3 15 } fail(String msg)16 public static void fail(String msg) { 17 throw new IllegalStateException("failure '" + msg + "'"); 18 } assrt(boolean val)19 public static void assrt(boolean val) { 20 if (!val) throw new IllegalStateException("assert failed"); 21 } assrt(String msg, boolean val)22 public static void assrt(String msg, boolean val) { 23 if (!val) throw new IllegalStateException("assert '" + msg + "' failed"); 24 } 25 } 26