
org.mixer2.jaxb.exception.Mixer2JAXBException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mixer2 Show documentation
Show all versions of mixer2 Show documentation
Mixer2 is template engine for java.
package org.mixer2.jaxb.exception;
import javax.xml.bind.JAXBException;
import javax.xml.bind.UnmarshalException;
import org.xml.sax.SAXParseException;
public class Mixer2JAXBException extends JAXBException {
private static final long serialVersionUID = 8467912128175039180L;
public Mixer2JAXBException(String message) {
super(message);
}
public Mixer2JAXBException(Throwable exception) {
super(exception);
}
public Mixer2JAXBException(String message, String errorCode) {
super(message, errorCode);
}
public Mixer2JAXBException(String message, String errorCode,
Throwable exception) {
super(message, errorCode, exception);
}
public Mixer2JAXBException(String message, Throwable exception) {
super(message, exception);
}
/**
*
* return true if this Exception links SAXParseException instance.
*
*
* @return
*/
public boolean hasSAXParseException() {
if (getSAXParseException() == null) {
return false;
} else {
return true;
}
}
/**
*
* return SAXParseException.getMessage() .
* return null if exception has not link to SAXParseException.
*
*
* @return
*/
public String getSAXParseExceptionMessage() {
if (hasSAXParseException()) {
return getSAXParseException().getMessage();
} else {
return null;
}
}
/**
*
* return SAXParseException.
* return null if exception has not link to SAXParseException.
*
* @return
*/
public SAXParseException getSAXParseException() {
SAXParseException ex = null;
Throwable linkedException = this.getLinkedException();
if (linkedException instanceof javax.xml.bind.UnmarshalException) {
UnmarshalException ue = (UnmarshalException) linkedException;
linkedException = ue.getLinkedException();
if (linkedException instanceof org.xml.sax.SAXParseException) {
ex = (SAXParseException) linkedException;
}
}
return ex;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy