2 *******************************************************************************
\r
3 * Copyright (C) 2005-2006, International Business Machines
\r
4 * Corporation and others. All Rights Reserved.
\r
5 *******************************************************************************
\r
7 package com.ibm.icu.impl;
\r
9 // 1.3 compatibility layer
\r
10 public class Assert {
\r
11 public static void fail(Exception e) {
\r
12 fail(e.toString()); // can't wrap exceptions in jdk 1.3
\r
14 public static void fail(String msg) {
\r
15 throw new IllegalStateException("failure '" + msg + "'");
\r
17 public static void assrt(boolean val) {
\r
18 if (!val) throw new IllegalStateException("assert failed");
\r
20 public static void assrt(String msg, boolean val) {
\r
21 if (!val) throw new IllegalStateException("assert '" + msg + "' failed");
\r