Fix: replace structured_error() with :with_traceback() #3

Closed
opened 2025-06-15 14:15:18 +00:00 by Ghost · 0 comments
Ghost commented 2025-06-15 14:15:18 +00:00 (Migrated from codeberg.org)

The current terminology for structured errors is somewhat confusing. The only difference it brings is whether traceback is attached or not. For this reason, it'd probably be better to make it an optional boolean flag:

local err = Result.err({ oh = "no" }):with_traceback()

Even better, maybe we should always attach traceback by default to every error, and make tracebacks a global configuration option? That way if someone really doesn't want it (for performance reasons), they can require("fallo").traceback(false).

The current terminology for structured errors is somewhat confusing. The only difference it brings is whether traceback is attached or not. For this reason, it'd probably be better to make it an optional boolean flag: ```lua local err = Result.err({ oh = "no" }):with_traceback() ``` Even better, maybe we should always attach traceback by default to every error, and make tracebacks a global configuration option? That way if someone really doesn't want it (for performance reasons), they can `require("fallo").traceback(false)`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
NTBBloodbath/fallo#3
No description provided.