fix: config_parser uses error() and io.open directly #26
Labels
No labels
coordination/cross-repo
coordination/needed
effort
large
effort
medium
effort
small
meta/duplicate
meta/planning
meta/wontfix
priority
high
priority
low
priority
medium
session
blocker
session
handover
session
next
status
blocked
status
done
status
in-progress
status
review
status
to-go
type
admin
type
bug
type
config
type
deployment
type
docs
type
enhancement
type
feature
type
handover
type
infrastructure
type
installation
type
maintenance
type
migration
type
research
type
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
DAW/daw-lua-common#26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problems
Header path and usage example are outdated:
src/daw/lua/common/config_parser.lua->daw/common/config_parser.luadaw.lua.common.config_parser->daw.common.config_parserparse_fileuseserror()throughout instead of returning nil, err.Violates DAW error handling standard.
Each error() is preceded by file:close() -- these calls can be
removed once error handling is converted to nil, err with early return.
io.openused directly -- see DAW/daw-lua-common#24 for policy decision.Fix depends on outcome of #24.
io.open replaced with fs.handle.open_read/read_line (new). error() replaced with nil,err returned at the exact point of failure -- no throw, no pcall wrapper at the M boundary. Contract change: parse_file() no longer throws. test_config_parser.lua updated accordingly.