gvsig-jcrsr264_no_JVM_crash.patch

Antonio Falciano, 09/09/2014 05:28 AM

Download (2.44 KB)

View differences:

org.gvsig.projection.jcrs.lib/src/main/java/org/gvsig/crs/proj/JNIBaseCrs.java (copia locale)
87 87
		//TODO: Revisarlo en el c�digo jni.
88 88
		//if (errNo<0 && errNo!=-10) throw new CrsProjException("Error creating CRS: "+strErrNo(errNo));
89 89
		if (errNo<0 && errNo!=-10) {
90
		    throw new CrsProjException("Error creating CRS. Erro code = "+errNo);
90
		    throw new CrsProjException("Error creating CRS.");
91 91
		}
92 92
		this.cPtr = cPtr;
93 93
		_strCrs=strCrs;
......
151 151
		//TODO: Revisarlo en el c�digo jni.
152 152
		//if(error!=0 && error !=-38) throw new OperationCrsException(srcCrs,destCrs, strErrNo(error));
153 153
		if(error!=0 && error !=-38) {
154
		    throw new OperationCrsException(error, srcCrs,destCrs, "Error code = "+error+", "+strErrno(error));
154
		    throw new OperationCrsException(error, srcCrs, destCrs, "");
155 155
		}
156 156
		return error;
157 157
	}
......
164 164
        long srcCrsPtr = srcCrs.getPtr();
165 165
        long destCrsPtr = destCrs.getPtr();
166 166
        if (srcCrsPtr == 0 || destCrsPtr == 0){
167
            throw new OperationCrsException(srcCrs,destCrs, "");
167
            throw new OperationCrsException(srcCrs, destCrs, "");
168 168
        }
169 169
		int error = operationSimple(firstCoord, secondCoord, thirdCoord,srcCrsPtr,destCrsPtr);
170 170
		// **** Provisional: strErrNo tira la m�quina virtual en Windows. *****
171 171
		//TODO: Revisarlo en el c�digo jni.
172 172
		//if(error!=1) throw new OperationCrsException(srcCrs,destCrs, strErrNo(error));
173
		if(error!=1) throw new OperationCrsException(error, srcCrs,destCrs, "Error code = "+error+", "+strErrno(error));
173
		if(error!=1) throw new OperationCrsException(error, srcCrs, destCrs, "");
174 174
	}
175 175

  
176 176
	public static void operateArraySimple(double[] Coord,
......
185 185
		// **** Provisional: strErrNo tira la m�quina virtual en Windows. *****
186 186
		//TODO: Revisarlo en el c�digo jni.
187 187
		//if(error!=1) throw new OperationCrsException(srcCrs,destCrs, strErrNo(error));
188
		if(error!=1) throw new OperationCrsException(error, srcCrs,destCrs,"Error code = "+error+", "+strErrno(error));
188
		if(error!=1) throw new OperationCrsException(error, srcCrs, destCrs, "");
189 189
	}
190 190

  
191 191
	public static int compareDatums(CrsProj crs1, CrsProj crs2){