comparison geo-backend/src/main/java/de/intevation/gnv/geobackend/base/connectionpool/exception/ConnectionException.java @ 130:e4eacd613356

Implementierung Datenzugriff auf die ArcSDE über java.sql. Methodiken ChangeLog wird nachgereicht da SubversionClientincompatiblitäten vorhanden sind. geo-backend/trunk@7 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Wed, 02 Sep 2009 15:15:52 +0000
parents
children 12f88239fb33
comparison
equal deleted inserted replaced
129:110e3ac1b7d2 130:e4eacd613356
1 /**
2 * 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 $
3 * Source: $Source: /share/gdi/SDI-Suite/Repository/projekte/BSH-GDI/genericViewer/src/main/java/de/conterra/bsh/gdi/gnviewer/exception/ConnectionException.java,v $
4 * created by: Stefan Blume (blume)
5 * erstellt am: 21.11.2007
6 * Copyright: con terra GmbH, 2005
7 *
8 * modified by: $Author: drewnak $
9 * modified on: $Date: 2008/08/18 14:50:33 $
10 * Version: $Revision: 1.2 $
11 * TAG: $Name: $
12 * locked from: $Locker: $
13 * CVS State: $State: Exp $
14 * Project: $ProjectName$
15 */
16 package de.intevation.gnv.geobackend.base.connectionpool.exception;
17
18 import com.esri.sde.sdk.client.SeError;
19 import com.esri.sde.sdk.client.SeException;
20
21 import de.intevation.gnv.geobackend.sde.datasources.exception.TechnicalException;
22
23 import org.apache.log4j.Logger;
24
25 /**
26 * The class <code>lConnectionException</code> fulfills the following purposes:
27 * <ol>
28 * <li></li>
29 * </ol>
30 *
31 * @author blume
32 * @version 1.0
33 * @serial 1.0
34 * @see
35 * @since 21.11.2007 08:13:05
36 */
37 public class ConnectionException extends TechnicalException {
38
39 /**
40 * Default Logging instance
41 */
42 private static Logger sLogger = Logger.getLogger(ConnectionException.class);
43
44 /**
45 * Constructs a new exception with <code>null</code> as its detail message.
46 * The cause is not initialized, and may subsequently be initialized by a
47 * call to {@link #initCause}.
48 */
49 public ConnectionException() {
50 }
51
52 /**
53 * Constructs a new exception with the specified detail message. The
54 * cause is not initialized, and may subsequently be initialized by
55 * a call to {@link #initCause}.
56 *
57 * @param message the detail message. The detail message is saved for
58 * later retrieval by the {@link #getMessage()} method.
59 */
60 public ConnectionException(String message) {
61 super(message);
62 }
63 public ConnectionException(Throwable pCause) {
64 super(pCause);
65 }
66
67 /**
68 * Constructs a new exception with the specified detail message and
69 * cause. <p>Note that the detail message associated with
70 * <code>cause</code> is <i>not</i> automatically incorporated in
71 * this exception's detail message.
72 *
73 * @param message the detail message (which is saved for later retrieval
74 * by the {@link #getMessage()} method).
75 * @param cause the cause (which is saved for later retrieval by the
76 * {@link #getCause()} method). (A <tt>null</tt> value is
77 * permitted, and indicates that the cause is nonexistent or
78 * unknown.)
79 * @since 1.4
80 */
81 public ConnectionException(String message, Throwable cause) {
82 super(message, cause);
83 }
84
85 /**
86 * Displays the details of an SeException (if available).
87 *
88 */
89 public void printError() {
90 if (getCause() != null && getCause() instanceof SeException) {
91 SeException exception = (SeException) getCause();
92 SeError error = exception.getSeError();
93
94 sLogger.debug("\n ArcSDE Error Number : " + error.getSdeError());
95 sLogger.debug(" Error Description : " + error.getErrDesc());
96
97 int extError = error.getExtError();
98 if (extError != 0)
99 sLogger.debug(" Extended Error Number : " + extError);
100
101 String desc = error.getSdeErrMsg();
102 if (desc != null && desc.length() != 0)
103 sLogger.debug(" Extended Error Description : " + desc);
104
105 desc = error.getExtErrMsg();
106 if (desc != null && desc.length() != 0)
107 sLogger.debug(" Extended Error Description : " + desc);
108
109 sLogger.debug(exception);
110
111 }
112
113 }
114 }

http://dive4elements.wald.intevation.org