diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-14 16:52:29 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-14 16:52:29 +0200 |
| commit | 2c0187f42cc45864932aba2529f876be86ddba39 (patch) | |
| tree | 4f13748309da87763c97a313fa3050c5f0fd63b3 /lib/kernel/validate.ml | |
| parent | bca1a206589bc41bbcb367a7ae9b217c02f0e892 (diff) | |
| download | colitur-2c0187f42cc45864932aba2529f876be86ddba39.tar.gz colitur-2c0187f42cc45864932aba2529f876be86ddba39.zip | |
kernel(lectionary): fix round 1 -- load never raises
Sexplib.Sexp.load_sexp raises bare Failure for several malformed inputs
(unterminated list/string, empty file, more than one sexp) rather than
Sexplib.Sexp.Parse_error, so those cases escaped Lectionary.load as an
uncaught exception -- breaking the .mli's own promise and the kernel's
never-raises-on-fallible-construction constraint. Mirrors the catch-all
already present in Layer.load and Overlay.load, plus a second catch-all
on the t_of_sexp branch for defence in depth.
Adds test_load_never_raises, covering all of the above plus a missing
file, using Filename.temp_file rather than a hardcoded path. Verified the
new test fails against the pre-fix load (uncaught Failure) and passes
against the fix.
Diffstat (limited to 'lib/kernel/validate.ml')
0 files changed, 0 insertions, 0 deletions
