Class GaiaError
java.lang.Object
tools.pantheum.gaia.error.GaiaError
An immutable validation error or advisory warning produced during GS1 element string parsing.
Each error carries a catalogue identifier (getId()), a severity
GaiaConstants.ErrorLevel, a pipeline GaiaConstants.ErrorStage, a
machine-readable getCode(), the Application Identifier that caused it
(getAi(), may be null), a human-readable interpolated
getMessage(), and the zero-based character getPosition() within
the original input.
Instances are created by ErrorRegistry,
which interpolates the localized message from the catalogue. The constructor is public
only because the registry lives in a sub-package; prefer
ErrorRegistry.INSTANCE.create(...) over constructing directly, or the error
will bypass the catalogue and carry unlocalized text.
-
Constructor Summary
ConstructorsConstructorDescriptionGaiaError(String id, GaiaConstants.ErrorLevel level, GaiaConstants.ErrorStage stage, String code, String ai, String message, int position) Creates a newGaiaError. -
Method Summary
-
Constructor Details
-
GaiaError
public GaiaError(String id, GaiaConstants.ErrorLevel level, GaiaConstants.ErrorStage stage, String code, String ai, String message, int position) Creates a newGaiaError.- Parameters:
id- the idlevel- the levelstage- the stagecode- the codeai- the AImessage- the messageposition- the position
-
-
Method Details
-
getId
-
getLevel
-
getStage
-
getCode
-
getAi
-
getMessage
-
getPosition
public int getPosition()Returns the position.- Returns:
- the position.
-
toString
-