Commit 748c027
committed
fix(schema): enhance error messages with file path context
Improved ParseError variants to include specific file paths in IO and YAML parsing errors,
making debugging easier when files are missing or contain invalid content.
- Modified ParseError::Io to include path information
- Modified ParseError::Yaml to include path information
- Added read_file_with_path helper function for consistent error handling
- Updated all file reading operations to use new error format
Now errors clearly indicate which specific file caused the issue, e.g.:
- "IO error at /path/to/course.yml: No such file or directory"
- "YAML parse error at /path/to/stage.yml: invalid type: string, expected u32"1 parent ae7eb36 commit 748c027
4 files changed
+103
-80
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
0 commit comments