FileDocCategorySizeDatePackage
RepositoryException.javaAPI DocGlassfish v2 API4229Fri May 04 22:24:30 BST 2007com.sun.enterprise.admin.servermgmt

RepositoryException

public class RepositoryException extends Exception
author
kebbs

Fields Summary
private final String
PREFIX
private final String
POSTFIX
Constructors Summary
public RepositoryException(String message)
Constructs a new InstanceException object.

param
message

        super(message);
    
public RepositoryException(Throwable cause)
Constructs a new InstanceException object.

param
cause

        //When created without a message, we take the message of our cause
        this(cause.getLocalizedMessage(), cause);
    
public RepositoryException(String message, Throwable cause)
Constructs a new InstanceException object.

param
message
param
cause

        super(message, cause);
    
Methods Summary
private java.lang.Stringformat(java.lang.String msg, java.lang.String causeMsg, java.lang.Throwable cause)

   
           
    
        if (cause != null) {
            if (msg != null) {
                if (causeMsg != null) {
                    msg = causeMsg;
                } else {
                    msg = cause.toString();
                }
            } else if (causeMsg != null && !causeMsg.equals(msg)) {
                msg += PREFIX + causeMsg + POSTFIX;               
            } else if (causeMsg == null) {
                msg += PREFIX + cause.toString() + POSTFIX;
            }
        }
        return msg;
    
public java.lang.StringgetLocalizedMessage()
If there is a cause, appends the getCause().getMessage() to the original message.

        String msg = super.getLocalizedMessage();
        Throwable cause = super.getCause();
        if (cause != null) {
            msg = format(msg, cause.getLocalizedMessage(), cause);
        }
        return msg;
    
public java.lang.StringgetMessage()
If there is a cause, appends the getCause().getMessage() to the original message.

        String msg = super.getMessage();
        Throwable cause = super.getCause();
        if (cause != null) {
            msg = format(msg, cause.getMessage(), cause);
        }
        return msg;