Open ruby0x1 opened 1 year ago
This behavior is normal per definition of fiber error. A non null value in a fiber error indicates that a fiber is in an error state. Therefore a null value indicates there is no error, and trying setting it to null should behave as this.
That said it is a little bit not intuitive, but doing otherwise would requires to use other bytes or use the other null (undefined) to implement an optional value like interface...
It's also as documented: If the message is null , does nothing.
Might even be useful for generating conditional errors.
Probably best left as it is.
thanks yea, I know it's documented, but it bit me when forwarding errors in larger scale projects so ✨
Making a note to investigate this.
Making a note to investigate this.
This one
gets the expected runtime error
while this one
still prints