KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > omg > CORBA > PolicyError


1 /*
2  * @(#)PolicyError.java 1.17 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package org.omg.CORBA;
9
10 /**
11 * A user exception thrown when a policy error occurs. A <code>PolicyError</code>
12 * exception may include one of the following policy error reason codes
13 * defined in the org.omg.CORBA package: BAD_POLICY, BAD_POLICY_TYPE,
14 * BAD_POLICY_VALUE, UNSUPPORTED_POLICY, UNSUPPORTED_POLICY_VALUE.
15 */

16
17 public final class PolicyError extends org.omg.CORBA.UserException JavaDoc {
18
19     /**
20      * The reason for the <code>PolicyError</code> exception being thrown.
21      * @serial
22      */

23     public short reason;
24
25     /**
26      * Constructs a default <code>PolicyError</code> user exception
27      * with no reason code and an empty reason detail message.
28      */

29     public PolicyError() {
30     super();
31     }
32
33     /**
34      * Constructs a <code>PolicyError</code> user exception
35      * initialized with the given reason code and an empty reason detail message.
36      * @param __reason the reason code.
37      */

38     public PolicyError(short __reason) {
39     super();
40     reason = __reason;
41     }
42
43     /**
44      * Constructs a <code>PolicyError</code> user exception
45      * initialized with the given reason detail message and reason code.
46      * @param reason_string the reason detail message.
47      * @param __reason the reason code.
48      */

49     public PolicyError(String JavaDoc reason_string, short __reason) {
50     super(reason_string);
51     reason = __reason;
52     }
53 }
54
Popular Tags