/** * Records a new error, throwing a {@link SnuggleParseException} if * the current {@link SessionConfiguration} deems that we should * fail on the first error. * * @param inputError {@link InputError} to register, which must not be null. * * @throws SnuggleParseException if this session is configured to fail fast */ public void registerError(InputError inputError) throws SnuggleParseException { ConstraintUtilities.ensureNotNull(inputError, "InputError"); errors.add(inputError); if (configuration.isFailingFast()) { throw new SnuggleParseException(inputError); } } }
/** * Records a new error, throwing a {@link SnuggleParseException} if * the current {@link SessionConfiguration} deems that we should * fail on the first error. * * @param inputError {@link InputError} to register, which must not be null. * * @throws SnuggleParseException if this session is configured to fail fast */ public void registerError(InputError inputError) throws SnuggleParseException { ConstraintUtilities.ensureNotNull(inputError, "InputError"); errors.add(inputError); if (configuration.isFailingFast()) { throw new SnuggleParseException(inputError); } } }
/** * Records a new error, throwing a {@link SnuggleParseException} if * the current {@link SessionConfiguration} deems that we should * fail on the first error. * * @param inputError {@link InputError} to register, which must not be null. * * @throws SnuggleParseException if this session is configured to fail fast */ public void registerError(InputError inputError) throws SnuggleParseException { ConstraintUtilities.ensureNotNull(inputError, "InputError"); errors.add(inputError); if (configuration.isFailingFast()) { throw new SnuggleParseException(inputError); } } }