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