gvsig-raster / org.gvsig.raster.gdal / tags / pre-remove-jgdal / org.gvsig.raster.gdal / org.gvsig.raster.gdal.io / src / main / java / org / gvsig / jogr / OGRException.java @ 3497
History | View | Annotate | Download (2.28 KB)
1 |
/**********************************************************************
|
---|---|
2 |
* $Id: OGRException.java 7792 2006-10-03 08:33:34Z nacho $
|
3 |
*
|
4 |
* Name: OGRException.java
|
5 |
* Project: JGDAL. Interface java to gdal (Frank Warmerdam).
|
6 |
* Purpose: Class for exceptions produced into OGR.
|
7 |
* Author: Nacho Brodin, brodin_ign@gva.es
|
8 |
*
|
9 |
**********************************************************************/
|
10 |
/*Copyright (C) 2004 Nacho Brodin <brodin_ign@gva.es>
|
11 |
|
12 |
This program is free software; you can redistribute it and/or
|
13 |
modify it under the terms of the GNU General Public License
|
14 |
as published by the Free Software Foundation; either version 2
|
15 |
of the License, or (at your option) any later version.
|
16 |
|
17 |
This program is distributed in the hope that it will be useful,
|
18 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
20 |
GNU General Public License for more details.
|
21 |
|
22 |
You should have received a copy of the GNU General Public License
|
23 |
along with this program; if not, write to the Free Software
|
24 |
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
25 |
*/
|
26 |
|
27 |
package org.gvsig.jogr; |
28 |
|
29 |
import org.gdal.osr.SpatialReference; |
30 |
|
31 |
/**
|
32 |
* Es generada cuando los c?digos de retorno de las funciones de OGR significan que algo ha ido mal.
|
33 |
*
|
34 |
* @author Nacho Brodin <brodin_ign@gva.es>.<BR> Equipo de desarrollo gvSIG.<BR> http://www.gvsig.gva.es
|
35 |
* @version 0.0
|
36 |
* @link http://www.gvsig.gva.es
|
37 |
*/
|
38 |
|
39 |
|
40 |
public class OGRException extends Exception{ |
41 |
|
42 |
OGRException(String msg){
|
43 |
super(msg);
|
44 |
} |
45 |
|
46 |
public OGRException(int n, String msg) { |
47 |
if(n == 1) |
48 |
System.out.println(msg+"Insuficientes parametros para construir el dato"); |
49 |
else if(n == 2) |
50 |
System.out.println(msg+"Insuficiente memoria para construir el dato"); |
51 |
else if(n == 3) |
52 |
System.out.println(msg+"Geometria no soportada"); |
53 |
else if(n == 4) |
54 |
System.out.println(msg+"Operacion no soportada"); |
55 |
else if(n == 5) |
56 |
System.out.println(msg+"Algun dato esta corrupto"); |
57 |
else if(n == 6) |
58 |
System.out.println(msg+"Fallo"); |
59 |
else if(n == 7) |
60 |
System.out.println(msg+"CRS no soportado"); |
61 |
} |
62 |
|
63 |
public OGRException(int res, String string, OGRSpatialReference v) { |
64 |
this(res, string);
|
65 |
} |
66 |
|
67 |
public OGRException(int res, String string, SpatialReference v) { |
68 |
this(res, string);
|
69 |
} |
70 |
} |