Open
Description
Description
This is in relation to https://bugs.php.net/bug.php?id=73149 (with 142 up votes) which points problematic error handling of dns_get_record
.
Due to BC break, this cannot be handled as a bug fix but there is a space to improve the error handling.
Firstly it would be useful to introduce parameter to switch the error handling to throw exception (e.g. bool $throw
), that would allow throwing specialized exception which would allow to identify type of the error.
Additionally it might be also useful to add retry mechanism as some failures for TRY_AGAIN
error.