Skip to content

Conversation

trowski
Copy link
Member

@trowski trowski commented Apr 6, 2023

This PR adds InternetAddress::tryFromString(), which is similar to fromString(), accept it returns null instead of throwing.

Seems we were a bit inconsistent with throwing SocketException vs. ValueError for invalid portions of the address. I changed them all to SocketException. I think this should be fine, since we declared the constructor and fromString as throwing SocketException on an invalid address.

@kelunik kelunik merged commit 70a72fb into 2.x Apr 6, 2023
@kelunik kelunik deleted the 2.x-try-internet-address branch April 6, 2023 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants