3 ms·
I find it strange to use try/catch to validate an address. I'd expect the validate function to return true/false. Is there more doc ? This could be interesting
by rakoo 13y ago
I find it strange to use try/catch to validate an address. I'd expect the validate function to return true/false.
Is there more doc ? This could be interesting.
- Guvante 13y agoIt looks like the intended use is to simply call validate and ignore the result, allowing you to assume from then on it is a valid address. In theory they should provide a "TryValidate" or similar but it doesn't look like they do at the moment.
- stith 13y agoI find that really strange as well. I haven't seen a Node library that uses exceptions for flow control before this, I wonder why they decided to start here.