diff --git a/arc-utils/src/main/java/fr/insee/arc/utils/exception/ArcException.java b/arc-utils/src/main/java/fr/insee/arc/utils/exception/ArcException.java index 4bad55784..ba05b93ec 100644 --- a/arc-utils/src/main/java/fr/insee/arc/utils/exception/ArcException.java +++ b/arc-utils/src/main/java/fr/insee/arc/utils/exception/ArcException.java @@ -14,6 +14,8 @@ public class ArcException extends Exception { */ private static final long serialVersionUID = -6127318245282541168L; + private ArcExceptionMessage error; + /** * build a custom business exception * @param error @@ -22,6 +24,7 @@ public class ArcException extends Exception { public ArcException(ArcExceptionMessage error, Object...parameters) { super(error.formatException(parameters)); this.initCause(new Throwable(error.formatException(parameters))); + this.error = error; } /** @@ -46,4 +49,10 @@ public ArcException logMessageException() return this; } + public ArcExceptionMessage getError() { + return error; + } + + + } diff --git a/arc-utils/src/main/java/fr/insee/arc/utils/exception/ArcExceptionMessage.java b/arc-utils/src/main/java/fr/insee/arc/utils/exception/ArcExceptionMessage.java index 7801239c3..dda9485f1 100644 --- a/arc-utils/src/main/java/fr/insee/arc/utils/exception/ArcExceptionMessage.java +++ b/arc-utils/src/main/java/fr/insee/arc/utils/exception/ArcExceptionMessage.java @@ -89,7 +89,12 @@ public enum ArcExceptionMessage { GENERIC_BEAN_KEY_VALUE_FAILED("GenericBean keyValue : the set hasn't exactly 2 elements and cannot be mapped to key>value format"), GENERIC_BEAN_DUPLICATE_KEY("GenericBean keyValue : duplicate key %s"), - SPRING_BEAN_PROPERTIES_NOTFOUND("Spring bean properties not found. Creating a blank singleton PropertiesHandler to be filled with right attributes."); + SPRING_BEAN_PROPERTIES_NOTFOUND("Spring bean properties not found. Creating a blank singleton PropertiesHandler to be filled with right attributes."), + + GUI_FAMILLENORME_VARIABLE_NULL("Une variable a un nom null"), + GUI_FAMILLENORME_VARIABLE_NO_TARGET_TABLE("Vous avez oublié de spécifier les tables cibles pour votre variable"), + GUI_FAMILLENORME_VARIABLE_ALREADY_EXISTS("La variable existe déjà. Pour la modifier, passez par la ligne correspondante du tableau variable*table.\nAucune variable n'a été ajoutée.\n"), + GUI_EXPORT_TABLE_NOT_EXISTS("La table n'existe pas") ;