Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion results.nim
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ func raiseResultError[T, E](self: Result[T, E]) {.noreturn, noinline.} =

when E is ref Exception:
if self.eResultPrivate.isNil: # for example Result.default()!
raise (ref ResultError[void])(msg: "Trying to access value with err (nil)")
raise (ref ResultDefect)(msg: "Trying to access value with err (nil)")
raise self.eResultPrivate
elif E is void:
raise (ref ResultError[void])(msg: "Trying to access value with err")
Expand Down