3 ms·
Ah. Thanks for the link. I didn't see anything that section talk about passing values with the Errors, based on your comment, is that even possible? If you had
by bluejekyll 9y ago
Ah. Thanks for the link. I didn't see anything that section talk about passing values with the Errors, based on your comment, is that even possible?
If you had an error you wished to pass a reason string for, would you need to use a global static or something?
- tiehuis 9y agoNot with the builtin error type. Its pretty much analogous to a c error code. If you wanted to send data you would need some other means like you suggest. I'd be interested in finding an ergonomic solution to this but it probably wouldn't be at the language level.