Release Notes
Features
Checked DataReadException for I/O read failures
DataReader now surfaces read failures through a checked DataReadException instead of silently returning null. Callers can finally tell a missing record apart from a genuine I/O error, and Vortex's batch tools report read failures as ERROR events rather than dropping them.
What's new
mil.army.usace.hec.vortex.io.DataReadException— a checked exception (extendsjava.io.IOException) thrown when aDataReaderfails to read a record from its underlying source: non-zero DSS status, JNI/native failure, an undecodable record, or an unopenable dataset. It carries diagnostic context without leaking the underlying provider's API:- a coarse
Kind—MISSING_RECORD,UNSUPPORTED, orIO_ERROR— for control-flow decisions, - the raw native status code,
- the data-source path, and
- the record-level pathname, when applicable.
- a coarse
DataReadExceptions— utility class whosereportTo(Logger, PropertyChangeSupport, DataReadException)performs the standard batch-boundary handling: log atSEVEREand fire aVortexProperty.ERRORevent.
API changes
- These
DataReadermethods now declarethrows DataReadException:getDtos(),getDto(int),getDataIntervals(),DataReaderBuilder.build(), andDataReader.copy(DataReader). Previously they silently returnednull(or an empty/partial result) on failure. getDto(int)now throwsIndexOutOfBoundsExceptionfor an out-of-range index (a programmer error), distinct fromDataReadExceptionfor a real read failure.- Bulk reads:
getDtos()still skipsMISSING_RECORD/UNSUPPORTEDrecords (now logged atFINE), preserving the prior "absence is legitimate" behavior — but a genuineIO_ERRORnow aborts the read instead of being silently dropped. Readers do not return a partial result on failure.
Migration
DataReadExceptionextendsIOException, so callers that already declarethrows IOExceptionorcatch (IOException ...)compile unchanged.- Callers that previously checked for
nullfromgetDto(int), or filtered nulls out ofgetDtos(), should instead let the exception propagate, or catchDataReadExceptionand branch ongetKind()(e.g. skipMISSING_RECORD, abort onIO_ERROR). - Switches on
Kindshould include adefaultcase — new values may be added in future releases. - Vortex's own batch tools (importers, exporter, subsetter, transposer, sanitizer, calculators, normalizer, grid-to-point converter) already route failures through
DataReadExceptions.reportTo, surfacing them asERRORproperty-change events instead of failing silently.
Bug Fixes
None in this release.