tim@130: /**
tim@130: * Title: lConnectionException, $Header: /share/gdi/SDI-Suite/Repository/projekte/BSH-GDI/genericViewer/src/main/java/de/conterra/bsh/gdi/gnviewer/exception/ConnectionException.java,v 1.2 2008/08/18 14:50:33 drewnak Exp $
tim@130: * Source: $Source: /share/gdi/SDI-Suite/Repository/projekte/BSH-GDI/genericViewer/src/main/java/de/conterra/bsh/gdi/gnviewer/exception/ConnectionException.java,v $
tim@130: * created by: Stefan Blume (blume)
tim@130: * erstellt am: 21.11.2007
tim@130: * Copyright: con terra GmbH, 2005
tim@130: *
tim@130: * modified by: $Author: drewnak $
tim@130: * modified on: $Date: 2008/08/18 14:50:33 $
tim@130: * Version: $Revision: 1.2 $
tim@130: * TAG: $Name: $
tim@130: * locked from: $Locker: $
tim@130: * CVS State: $State: Exp $
tim@130: * Project: $ProjectName$
tim@130: */
tim@130: package de.intevation.gnv.geobackend.base.connectionpool.exception;
tim@130:
tim@130: import com.esri.sde.sdk.client.SeError;
tim@130: import com.esri.sde.sdk.client.SeException;
tim@130:
tim@130: import de.intevation.gnv.geobackend.sde.datasources.exception.TechnicalException;
tim@130:
tim@130: import org.apache.log4j.Logger;
tim@130:
tim@130: /**
tim@130: * The class lConnectionException
fulfills the following purposes:
tim@130: *
null
as its detail message.
tim@130: * The cause is not initialized, and may subsequently be initialized by a
tim@130: * call to {@link #initCause}.
tim@130: */
tim@130: public ConnectionException() {
tim@130: }
tim@130:
tim@130: /**
tim@130: * Constructs a new exception with the specified detail message. The
tim@130: * cause is not initialized, and may subsequently be initialized by
tim@130: * a call to {@link #initCause}.
tim@130: *
tim@130: * @param message the detail message. The detail message is saved for
tim@130: * later retrieval by the {@link #getMessage()} method.
tim@130: */
tim@130: public ConnectionException(String message) {
tim@130: super(message);
tim@130: }
tim@130: public ConnectionException(Throwable pCause) {
tim@130: super(pCause);
tim@130: }
tim@130:
tim@130: /**
tim@130: * Constructs a new exception with the specified detail message and
tim@130: * cause. Note that the detail message associated with
tim@130: * cause
is not automatically incorporated in
tim@130: * this exception's detail message.
tim@130: *
tim@130: * @param message the detail message (which is saved for later retrieval
tim@130: * by the {@link #getMessage()} method).
tim@130: * @param cause the cause (which is saved for later retrieval by the
tim@130: * {@link #getCause()} method). (A null value is
tim@130: * permitted, and indicates that the cause is nonexistent or
tim@130: * unknown.)
tim@130: * @since 1.4
tim@130: */
tim@130: public ConnectionException(String message, Throwable cause) {
tim@130: super(message, cause);
tim@130: }
tim@130:
tim@130: /**
tim@130: * Displays the details of an SeException (if available).
tim@130: *
tim@130: */
tim@130: public void printError() {
tim@130: if (getCause() != null && getCause() instanceof SeException) {
tim@130: SeException exception = (SeException) getCause();
tim@130: SeError error = exception.getSeError();
tim@130:
tim@130: sLogger.debug("\n ArcSDE Error Number : " + error.getSdeError());
tim@130: sLogger.debug(" Error Description : " + error.getErrDesc());
tim@130:
tim@130: int extError = error.getExtError();
tim@130: if (extError != 0)
tim@130: sLogger.debug(" Extended Error Number : " + extError);
tim@130:
tim@130: String desc = error.getSdeErrMsg();
tim@130: if (desc != null && desc.length() != 0)
tim@130: sLogger.debug(" Extended Error Description : " + desc);
tim@130:
tim@130: desc = error.getExtErrMsg();
tim@130: if (desc != null && desc.length() != 0)
tim@130: sLogger.debug(" Extended Error Description : " + desc);
tim@130:
tim@130: sLogger.debug(exception);
tim@130:
tim@130: }
tim@130:
tim@130: }
tim@130: }