This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch 1.4.1
in repository https://gitbox.apache.org/repos/asf/sis.git


The following commit(s) were added to refs/heads/1.4.1 by this push:
     new 14cee050b5 `MissingFactoryResourceException` needs to be propagated 
when a NADCON file is not found. NTv2 was okay, but nevertheless apply the same 
pattern to other grid formats for safety.
14cee050b5 is described below

commit 14cee050b538a4002c27bf27d9e3ac881c20a3c3
Author: Martin Desruisseaux <[email protected]>
AuthorDate: Thu Jul 3 10:28:01 2025 +0200

    `MissingFactoryResourceException` needs to be propagated when a NADCON file 
is not found.
    NTv2 was okay, but nevertheless apply the same pattern to other grid 
formats for safety.
---
 .../referencing/operation/provider/FranceGeocentricInterpolation.java   | 2 ++
 .../main/org/apache/sis/referencing/operation/provider/NADCON.java      | 2 ++
 .../main/org/apache/sis/referencing/operation/provider/NTv2.java        | 2 ++
 3 files changed, 6 insertions(+)

diff --git 
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/provider/FranceGeocentricInterpolation.java
 
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/provider/FranceGeocentricInterpolation.java
index 81254b185f..6f9993130e 100644
--- 
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/provider/FranceGeocentricInterpolation.java
+++ 
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/provider/FranceGeocentricInterpolation.java
@@ -353,6 +353,8 @@ public class FranceGeocentricInterpolation extends 
GeodeticOperation {
         final DatumShiftGridFile<Angle,Length> grid;
         try {
             grid = getOrLoad(file, isRecognized(file) ? new double[] {TX, TY, 
TZ} : null, PRECISION);
+        } catch (FactoryException e) {
+            throw e;
         } catch (Exception e) {
             // NumberFormatException, ArithmeticException, 
NoSuchElementException, and more.
             throw DatumShiftGridLoader.canNotLoad(HEADER, file, e);
diff --git 
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/provider/NADCON.java
 
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/provider/NADCON.java
index 24bed0b613..b89a4a9842 100644
--- 
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/provider/NADCON.java
+++ 
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/provider/NADCON.java
@@ -143,6 +143,8 @@ public final class NADCON extends AbstractProvider {
                     getOrLoad(pg.getMandatoryValue(LATITUDE), 
pg.getMandatoryValue(LONGITUDE)));
         } catch (NoSuchFileException e) {
             throw new MissingFactoryResourceException(e.getMessage(), e);
+        } catch (FactoryException e) {
+            throw e;
         } catch (Exception e) {
             throw new FactoryException(e);
         }
diff --git 
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/provider/NTv2.java
 
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/provider/NTv2.java
index e7d8bd01b0..2409ca3118 100644
--- 
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/provider/NTv2.java
+++ 
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/provider/NTv2.java
@@ -145,6 +145,8 @@ public final class NTv2 extends AbstractProvider {
         final DatumShiftGridFile<Angle,Angle> grid;
         try {
             grid = getOrLoad(provider, file, version);
+        } catch (FactoryException e) {
+            throw e;
         } catch (Exception e) {
             throw DatumShiftGridLoader.canNotLoad(provider.getSimpleName(), 
file, e);
         }

Reply via email to