package at.knowcenter.wag.egov.egiz.ldap.api; /** * @author Thomas Knall */ public class LDAPAPIException extends Exception { private static final long serialVersionUID = 1L; private Exception exception; public Exception getException() { return this.exception; } public String getMessage() { String message = super.getMessage(); if (message == null && exception != null) { return exception.getMessage(); } else { return message; } } public LDAPAPIException(String message, Exception exception) { super(message); this.exception = exception; } public LDAPAPIException(String message) { super(message); this.exception = null; } public LDAPAPIException(Exception exception) { super(); this.exception = exception; } public LDAPAPIException() { super(); this.exception = null; } @Override public String toString() { if (exception != null) { return exception.toString(); } else { return super.toString(); } } }