-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
The current error strategy is to implement IntoPrologException on the error results we wish to be able to convert into prolog errors using Context::try_or_die(..).
A common pattern that has emerged is that our error types tend to be enums, and the error terms we want to get out of those tend to be simple prolog functors that structure the enum data. Therefore, a common implementation of IntoPrologException tends to be a match on the error type, where for each match arm, a term! macro is used to build the resulting term.
It would be nice if this could be abstracted away using an attribute macro on the error enum instead, comparable to what the thiserror crate does.
Metadata
Metadata
Assignees
Labels
No labels