Mercurial > dive4elements > gnv-client
view geo-backend/src/main/java/de/intevation/gnv/geobackend/base/connectionpool/exception/ConnectionException.java @ 897:02cd2935b5fa
Removed trailing whitespace.
geo-backend/trunk@1013 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 28 Apr 2010 07:04:19 +0000 |
parents | d674cef2ca0d |
children | ebeb56428409 |
line wrap: on
line source
package de.intevation.gnv.geobackend.base.connectionpool.exception; import com.esri.sde.sdk.client.SeError; import com.esri.sde.sdk.client.SeException; import de.intevation.gnv.geobackend.sde.datasources.exception.TechnicalException; import org.apache.log4j.Logger; /** * The class <code>lConnectionException</code> fulfills the following purposes: * * @author blume * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> */ public class ConnectionException extends TechnicalException { /** * The UID of this Class. */ private static final long serialVersionUID = 102459262123219617L; /** * Default Logging instance */ private static Logger sLogger = Logger.getLogger(ConnectionException.class); /** * Constructs a new exception with <code>null</code> as its detail message. * The cause is not initialized, and may subsequently be initialized by a * call to {@link #initCause}. */ public ConnectionException() { } /** * Constructs a new exception with the specified detail message. The * cause is not initialized, and may subsequently be initialized by * a call to {@link #initCause}. * * @param message the detail message. The detail message is saved for * later retrieval by the {@link #getMessage()} method. */ public ConnectionException(String message) { super(message); } /** * Constructor * @param pCause the Throwable which cause this exception */ public ConnectionException(Throwable pCause) { super(pCause); } /** * Constructs a new exception with the specified detail message and * cause. <p>Note that the detail message associated with * <code>cause</code> is <i>not</i> automatically incorporated in * this exception's detail message. * * @param message the detail message (which is saved for later retrieval * by the {@link #getMessage()} method). * @param cause the cause (which is saved for later retrieval by the * {@link #getCause()} method). (A <tt>null</tt> value is * permitted, and indicates that the cause is nonexistent or * unknown.) * @since 1.4 */ public ConnectionException(String message, Throwable cause) { super(message, cause); } /** * Displays the details of an SeException (if available). * */ public void printError() { if (getCause() != null && getCause() instanceof SeException) { SeException exception = (SeException) getCause(); SeError error = exception.getSeError(); sLogger.debug("\n ArcSDE Error Number : " + error.getSdeError()); sLogger.debug(" Error Description : " + error.getErrDesc()); int extError = error.getExtError(); if (extError != 0) sLogger.debug(" Extended Error Number : " + extError); String desc = error.getSdeErrMsg(); if (desc != null && desc.length() != 0) sLogger.debug(" Extended Error Description : " + desc); desc = error.getExtErrMsg(); if (desc != null && desc.length() != 0) sLogger.debug(" Extended Error Description : " + desc); sLogger.debug(exception); } } }