View Javadoc
1 /*** 2 * $Header: /cvsroot/ebxmlrr/ebxmlrr/src/share/com/sun/ebxml/registry/RegistryException.java,v 1.3 2002/11/09 04:46:12 jasilva Exp $ * 3 */ 4 package com.sun.ebxml.registry; 5 6 7 /*** 8 * Signals that a Registry exception has occured. It contains no members other than the standard reason String. 9 * 10 * @author Nicholas Kassem 11 * @author Mark Hapner 12 * @author Rajiv Mordani 13 * 14 */ 15 public class RegistryException extends Exception { 16 private Exception exception; 17 18 /*** 19 * Construct a RegistryException with no reason. 20 * 21 * 22 * @see 23 */ 24 public RegistryException() { 25 super(); 26 this.exception = null; 27 } 28 29 30 /*** 31 * Construct a RegistryException with a reason . 32 * 33 * 34 * @param reason 35 * 36 * @see 37 */ 38 public RegistryException(String reason) { 39 super(reason); 40 this.exception = null; 41 } 42 43 44 /*** 45 * Construct a RegistryException with the embedded exception and the reason for. 46 * 47 * 48 * @param reason 49 * @param exception 50 * 51 * @see 52 */ 53 public RegistryException(String reason, Exception exception) { 54 super(reason); 55 this.exception = exception; 56 } 57 58 59 /*** 60 * Construct a RegistryException with the embedded exception. 61 * 62 * 63 * @param exception 64 * 65 * @see 66 */ 67 public RegistryException(Exception exception) { 68 super(); 69 this.exception = exception; 70 } 71 72 73 /*** 74 * Return a detail message for this exception. 75 * 76 * 77 * @return 78 * 79 * @see 80 */ 81 public String getMessage() { 82 String message = super.getMessage(); 83 84 if (message == null && exception != null) { 85 return exception.getMessage(); 86 } 87 else { 88 return message; 89 } 90 } 91 92 93 /*** 94 * Return the embedded exception, if any. 95 * 96 * 97 * @return 98 * 99 * @see 100 */ 101 public Exception getException() { 102 return exception; 103 } 104 105 }

This page was automatically generated by Maven