LinearTapeFileSystem / ltfs

Reference implementation of the LTFS format Spec for stand alone tape drive
BSD 3-Clause "New" or "Revised" License
256 stars 77 forks source link

Refactor the XML parser to return more graceful information #281

Closed piste-jp closed 3 years ago

piste-jp commented 3 years ago

Summary of changes

Generate graceful error information when an error happens while reading an index.

Description

This PR includes the changes below.

  1. Detect I/O error on xml read callbacks and report it at the end of parse
  2. Detect incorrect value in the XML and report it correctly
  3. The XML parser returns meaningful error code instead of -1

Fixes #110

Type of change

Checklist:

piste-jp commented 3 years ago

Merged to v2.4-stable by cherry-pick