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