01: /*
02: *******************************************************************************
03: * Copyright (C) 2005-2006, International Business Machines
04: * Corporation and others. All Rights Reserved.
05: *******************************************************************************
06: */
07: package com.ibm.icu.impl;
08:
09: // 1.3 compatibility layer
10: public class Assert {
11: public static void fail(Exception e) {
12: fail(e.toString()); // can't wrap exceptions in jdk 1.3
13: }
14:
15: public static void fail(String msg) {
16: throw new IllegalStateException("failure '" + msg + "'");
17: }
18:
19: public static void assrt(boolean val) {
20: if (!val)
21: throw new IllegalStateException("assert failed");
22: }
23:
24: public static void assrt(String msg, boolean val) {
25: if (!val)
26: throw new IllegalStateException("assert '" + msg
27: + "' failed");
28: }
29: }
|