Skip to content

Improve dns_get_record / dns_check_record error handling #17919

Open
@bukka

Description

@bukka

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions