Comment by je42
2 days ago
Nice language! I am wondering how error handling / exceptions works in bolt?
Quickly scanned the programming guide - but wasn't able to find it. Did i miss a section?
2 days ago
Nice language! I am wondering how error handling / exceptions works in bolt?
Quickly scanned the programming guide - but wasn't able to find it. Did i miss a section?
As far as i can see it is simple, everything can return an Error, so you have to check the return value if it is an error.
https://github.com/Beariish/bolt/blob/main/examples/error_ha...
That's definitely not universally true, with even the core library getting into the "null indicates error" game https://github.com/Beariish/bolt/blob/0.1.0/doc/Bolt%20Stand... or this fun middle ground where it could be Error or null https://github.com/Beariish/bolt/blob/0.1.0/doc/Bolt%20Stand...
But I think OP was asking about whatever the hell this means by "native error callback" https://github.com/Beariish/bolt/blob/0.1.0/doc/Bolt%20Stand...
I think I was looking for both error / exception handling within the language and across the C api.