01: /*
02: * Copyright 2004 (C) TJDO.
03: * All rights reserved.
04: *
05: * This software is distributed under the terms of the TJDO License version 1.0.
06: * See the terms of the TJDO License in the documentation provided with this software.
07: *
08: * $Id: SCOException.java,v 1.4 2004/01/18 03:01:06 jackknifebarber Exp $
09: */
10:
11: package com.triactive.jdo.sco;
12:
13: import com.triactive.jdo.SCO;
14: import javax.jdo.JDOUserException;
15:
16: /**
17: * A <tt>SCOException</tt> indicates an error in the construction or usage of
18: * of a second-class object instance.
19: *
20: * @author <a href="mailto:mmartin5@austin.rr.com">Mike Martin</a>
21: * @version $Revision: 1.4 $
22: */
23:
24: public class SCOException extends JDOUserException {
25: /**
26: * Constructs an SCO exception.
27: *
28: * @param sco The second-class object.
29: * @param message The error message.
30: */
31:
32: public SCOException(SCO sco, String message) {
33: super (message + ": " + SCOHelper.toLogString(sco));
34: }
35:
36: /**
37: * Constructs an SCO exception with nested <code>Throwable<code>s.
38: *
39: * @param sco The second-class object.
40: * @param message The error message.
41: * @param nested The nested Throwables.
42: */
43:
44: public SCOException(SCO sco, String message, Throwable[] nested) {
45: super (message + ": " + SCOHelper.toLogString(sco), nested);
46: }
47: }
|