Closed migueldeicaza closed 6 months ago
Another feature beyond throwing is that Result uses error as well https://developer.apple.com/documentation/swift/result. Result is pretty useful in situations where throwing doesn't conform to the general flow of the program like networking or async/callbacks
Oh, very good point.
Oh, that was already the case, just as an extension.
I cleaned it up a little to make it more obvious, and so I do not trip next time I have this idea.
But I went ahead and added a debugDescription
to enums as well, as a companion to the OptionSets that already implemented this feature.
Should the
GodotError
enumeration adopt theError
protocol so that it can be thrown?