Hallo zusammen
Ich habe eine eignen Exception gebastelt:
Macht der Konstruktor aufbau Sinn mit dem Aufruf des Super Konstruktors zuerst?
Danke und Gruss
Ich habe eine eignen Exception gebastelt:
Java:
public class EncryptionServiceException extends Exception {
/**
* The constant <code>serialVersionUID</code>
*/
private static final long serialVersionUID = 4391083938613576892L;
/**
* The constant <code>CONFIGURATION_ERROR</code> is for errors which occurres from the
* configuration.
*/
public static final String CONFIGURATION_ERROR = "configuration error";
/**
* The constant <code>TYPE_NOT_SUPPORTED_ERROR</code> is for errors which occurres when
* a property type will be used which is not supported.
*/
public static final String TYPE_NOT_SUPPORTED_ERROR = "Type not supported error";
private String m_exceptionType;
/**
* Constructor for EncryptionServiceException
* @param exceptionType The exception type:
* @param cause
*/
public EncryptionServiceException(String exceptionType, Throwable cause) {
super(cause);
m_exceptionType = exceptionType;
}
/**
* Constructor for EncryptionServiceException
* @param exceptionType
* @param message
*/
public EncryptionServiceException(String exceptionType, String message) {
super(message);
m_exceptionType = exceptionType;
}
/* (non-Javadoc)
* @see java.lang.Throwable#toString()
*/
public String toString() {
return "EncryptionServiceException: " + m_exceptionType + " occurred";
}
Macht der Konstruktor aufbau Sinn mit dem Aufruf des Super Konstruktors zuerst?
Danke und Gruss