01: // Modified or written by Object Mentor, Inc. for inclusion with FitNesse.
02: // Copyright (c) 2002 Cunningham & Cunningham, Inc.
03: // Released under the terms of the GNU General Public License version 2 or later.
04: package fit.exception;
05:
06: import java.text.MessageFormat;
07:
08: public abstract class FixtureException extends FitFailureException {
09: public final String fixtureName;
10:
11: public FixtureException(String messageFormat, String fixtureName) {
12: super (formatMessage(messageFormat, fixtureName));
13: this .fixtureName = fixtureName;
14: }
15:
16: private static String formatMessage(String messageFormat,
17: String fixtureName) {
18: return new MessageFormat(messageFormat)
19: .format(new Object[] { fixtureName });
20: }
21: }
|