Filereader error messages now include both original exception details and file path for easier debugging

This commit is contained in:
Yiorgis Gozadinos 2025-11-10 18:26:25 +02:00
parent 34f50f37a0
commit 942ad2818f
No known key found for this signature in database
2 changed files with 8 additions and 2 deletions

View file

@ -1,6 +1,10 @@
# Changelog
## [Unreleased]
### Fixed
- **FileReader**: Error messages now include both original exception details and file path for easier debugging
## [0.15.0] - 2025-11-07
### Added

View file

@ -129,5 +129,7 @@ class FileReader:
return text_to_docling_document(content, name=f"{path.stem}.md")
except ImportError:
raise
except Exception:
raise ValueError(f"Failed to parse file: {path}")
except Exception as e:
raise ValueError(
f"Failed to parse file: {path} - {type(e).__name__}: {e}"
) from e