Se gestionaron los nuevos tipos de Excepciones

This commit is contained in:
Jorge Espinoza
2026-10-22 16:07:39 +02:00
parent 98e5148abc
commit 6f140ce531
6 changed files with 186 additions and 138 deletions
@@ -3,6 +3,7 @@ package org.palomafp.aadd.jaec.config;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import org.palomafp.aadd.jaec.excepciones.TecnicoException;
public class Configuracion {
@@ -19,13 +20,13 @@ public class Configuracion {
try (InputStream input = Configuracion.class.getClassLoader().getResourceAsStream(RUTA_FICHERO_CONFIGURACION)) {
if (input == null) {
throw new IOException("No se encuentra " + RUTA_FICHERO_CONFIGURACION + " en el classpath");
throw new TecnicoException("No se encuentra " + RUTA_FICHERO_CONFIGURACION + " en el classpath");
}
PROPIEDADES.load(input);
} catch (IOException e) {
throw new RuntimeException("No se pudo cargar el fichero de configuración", e);
} catch (IOException | TecnicoException e) {
throw new RuntimeException(new TecnicoException("No se pudo cargar el fichero de configuración", e));
}
}