1. /*
  2. * @(#)PolicyError.java 1.16 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package org.omg.CORBA;
  8. /**
  9. * A user exception thrown when a policy error occurs. A <code>PolicyError</code>
  10. * exception may include one of the following policy error reason codes
  11. * defined in the org.omg.CORBA package: BAD_POLICY, BAD_POLICY_TYPE,
  12. * BAD_POLICY_VALUE, UNSUPPORTED_POLICY, UNSUPPORTED_POLICY_VALUE.
  13. */
  14. public final class PolicyError extends org.omg.CORBA.UserException {
  15. /**
  16. * The reason for the <code>PolicyError</code> exception being thrown.
  17. * @serial
  18. */
  19. public short reason;
  20. /**
  21. * Constructs a default <code>PolicyError</code> user exception
  22. * with no reason code and an empty reason detail message.
  23. */
  24. public PolicyError() {
  25. super();
  26. }
  27. /**
  28. * Constructs a <code>PolicyError</code> user exception
  29. * initialized with the given reason code and an empty reason detail message.
  30. * @param __reason the reason code.
  31. */
  32. public PolicyError(short __reason) {
  33. super();
  34. reason = __reason;
  35. }
  36. /**
  37. * Constructs a <code>PolicyError</code> user exception
  38. * initialized with the given reason detail message and reason code.
  39. * @param reason_string the reason detail message.
  40. * @param __reason the reason code.
  41. */
  42. public PolicyError(String reason_string, short __reason) {
  43. super(reason_string);
  44. reason = __reason;
  45. }
  46. }