Revision 26604 tmp/trunk/cliente/WorkSpace_WPSClient/extWPSCallejero/src/es/logex/gvsig/fmap/drivers/WPSException.java
WPSException.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2008 Logica Extrema, S.L. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Ibáñez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* Logica Extrema, S.L. |
|
34 |
* Edif. Sorolla Center |
|
35 |
* Avgda. De les Corts Valencianes, 158 Of.1007 |
|
36 |
* 46015 Valencia |
|
37 |
* Spain |
|
38 |
* |
|
39 |
* +34 963462375 |
|
40 |
* info@logex.es |
|
41 |
*/ |
|
1 | 42 |
package es.logex.gvsig.fmap.drivers; |
2 | 43 |
|
3 | 44 |
import com.iver.andami.PluginServices; |
... | ... | |
2 | 43 |
|
44 |
/** |
|
45 |
* The Class WPSException. |
|
46 |
*/ |
|
3 | 47 |
public class WPSException extends Exception { |
4 | 48 |
|
5 |
/** |
|
6 |
* |
|
7 |
*/ |
|
49 |
/** The Constant serialVersionUID. */ |
|
8 | 50 |
private static final long serialVersionUID = -2696087802051634058L; |
51 |
|
|
52 |
/** The Constant EXC_LAYER_DOESNT_EXIST. */ |
|
9 | 53 |
public static final String EXC_LAYER_DOESNT_EXIST = "cantLoad"; |
54 |
|
|
55 |
/** The Constant EXC_PROCESS_DOESNT_EXIST. */ |
|
10 | 56 |
public static final String EXC_PROCESS_DOESNT_EXIST = "cantLoad"; |
11 | 57 |
|
58 |
/** The message. */ |
|
12 | 59 |
private String message = ""; |
13 | 60 |
|
61 |
/** |
|
62 |
* |
|
63 |
* @return the message |
|
64 |
* |
|
65 |
* @see java.lang.Throwable#getMessage() |
|
66 |
*/ |
|
14 | 67 |
public String getMessage() { |
... | ... | |
18 | 71 |
} |
19 | 72 |
|
20 | 73 |
/** |
21 |
* |
|
74 |
* Instantiates a new wPS exception.
|
|
22 | 75 |
*/ |
23 | 76 |
public WPSException() { |
24 | 77 |
super(); |
... | ... | |
26 | 79 |
|
27 | 80 |
/** |
28 | 81 |
* Crea WFSException. |
29 |
* |
|
30 |
* @param message |
|
82 |
*
|
|
83 |
* @param message the message
|
|
31 | 84 |
*/ |
32 | 85 |
public WPSException(String message) { |
33 | 86 |
super(); |
... | ... | |
36 | 89 |
|
37 | 90 |
|
38 | 91 |
/** |
39 |
* Crea WMSException.
|
|
40 |
* |
|
41 |
* @param cause |
|
92 |
* Crea WMSException. |
|
93 |
*
|
|
94 |
* @param cause the cause
|
|
42 | 95 |
*/ |
43 | 96 |
public WPSException(Throwable cause) { |
44 | 97 |
super(cause); |
45 | 98 |
} |
46 | 99 |
|
47 | 100 |
/** |
48 |
* Cuts the message text to force its lines to be shorter or equal to |
|
49 |
* lineLength. |
|
50 |
* @param message, the message. |
|
51 |
* @param lineLength, the max line length in number of characters. |
|
52 |
* @return the formated message. |
|
53 |
*/ |
|
101 |
* Cuts the message text to force its lines to be shorter or equal to |
|
102 |
* lineLength. |
|
103 |
* |
|
104 |
* @param message the message |
|
105 |
* @param lineLength the line length |
|
106 |
* |
|
107 |
* @return the formated message. |
|
108 |
*/ |
|
54 | 109 |
private static String format(String message, int lineLength){ |
55 | 110 |
if (message.length() <= lineLength) return message; |
56 | 111 |
String[] lines = message.split("\n"); |
Also available in: Unified diff