01: /*
02: * This file or a portion of this file is licensed under the terms of
03: * the Globus Toolkit Public License, found in file GTPL, or at
04: * http://www.globus.org/toolkit/download/license.html. This notice must
05: * appear in redistributions of this file, with or without modification.
06: *
07: * Redistributions of this Software, with or without modification, must
08: * reproduce the GTPL in: (1) the Software, or (2) the Documentation or
09: * some other similar material which is provided with the Software (if
10: * any).
11: *
12: * Copyright 1999-2004 University of Chicago and The University of
13: * Southern California. All rights reserved.
14: */
15:
16: package org.griphyn.cPlanner.provenance.pasoa.producer;
17:
18: import org.griphyn.common.util.FactoryException;
19:
20: import org.griphyn.cPlanner.provenance.pasoa.XMLProducer;
21:
22: /**
23: * Class to notify of failures while instantiating XMLProducer implementations.
24: *
25: * @author Karan Vahi
26: * @version $Revision: 241 $
27: */
28:
29: public class XMLProducerFactoryException extends FactoryException {
30:
31: /**
32: * The default classname that is associated with the exception.
33: */
34: public static final String DEFAULT_NAME = "XMLProducer";
35:
36: /**
37: * Constructs a <code>XMLProducerFactoryException</code> with no detail
38: * message. The associated classname is set to value specified by
39: * <code>DEFAULT_NAME</code>.
40: *
41: * @param msg the detailed message.
42: *
43: * @see #DEFAULT_NAME
44: */
45: public XMLProducerFactoryException(String msg) {
46: super (msg);
47: mClassname = this .DEFAULT_NAME;
48: }
49:
50: /**
51: * Constructs a <code>XMLProducerFactoryException</code> with the specified detailed
52: * message.
53: *
54: * @param msg is the detailed message.
55: * @param classname the name of class that was trying to be instantiated or
56: * some other signifier like module name.
57: */
58: public XMLProducerFactoryException(String msg, String classname) {
59: super (msg, classname);
60: }
61:
62: /**
63: * Constructs a <code>XMLProducerFactoryException</code> with the
64: * specified detailed message and a cause. The associated classname is set
65: * to value specified by <code>DEFAULT_NAME</code>.
66: *
67: * @param msg is the detailed message that is to be logged.
68: * @param cause is the cause (which is saved for later retrieval by the
69: * {@link java.lang.Throwable#getCause()} method). A <code>null</code>
70: * value is permitted, and indicates that the cause is nonexistent or
71: * unknown.
72: *
73: * @see #DEFAULT_NAME
74: */
75: public XMLProducerFactoryException(String msg, Throwable cause) {
76: super (msg, cause);
77: mClassname = this .DEFAULT_NAME;
78: }
79:
80: /**
81: * Constructs a <code>XMLProducerFactoryException</code> with the
82: * specified detailed message and a cause.
83: *
84: * @param msg is the detailed message that is to be logged.
85: * @param classname the name of class that was trying to be instantiated.
86: * @param cause is the cause (which is saved for later retrieval by the
87: * {@link java.lang.Throwable#getCause()} method). A <code>null</code>
88: * value is permitted, and indicates that the cause is nonexistent or
89: * unknown.
90: */
91: public XMLProducerFactoryException(String msg, String classname,
92: Throwable cause) {
93:
94: super(msg, cause);
95: mClassname = classname;
96: }
97:
98: }
|