package javax.xml.registry;
import org.jboss.util.id.SerialVersion;
public class JAXRException extends Exception
implements JAXRResponse
{
static final long serialVersionUID;
static
{
if (SerialVersion.version == SerialVersion.LEGACY)
serialVersionUID = -4890474253443089374L;
else
serialVersionUID = -396751348710944315L;
}
protected Throwable cause;
public JAXRException()
{
}
public JAXRException(String msg)
{
super(msg);
}
public JAXRException(String msg, Throwable cause)
{
super(msg, cause);
}
public JAXRException(Throwable cause)
{
super(cause);
}
public String getRequestId()
{
return null;
}
public int getStatus()
{
return 0;
}
public boolean isAvailable() throws JAXRException
{
return true;
}
public Throwable initCause(Throwable cause)
{
if( this.cause != null )
{
if( this.cause == this )
throw new IllegalArgumentException("A throwable cannot be its own cause.");
else
throw new IllegalStateException("cause has already been set");
}
this.cause = cause;
super.initCause(cause);
return this;
}
}