Improve error reporting when query fails, include domain and query type and DNS server address where applicable #174
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This changeset improves error reporting when a query fails. The exception message now always includes domain and query type and the DNS server address where applicable.
For example:
This makes it much easier to debug in case of an error (#173, reactphp/socket#230, beyondcode/expose#25 and others). Additionally, I consider this to be a prerequisite for future multiple DNS servers (#6) that will be added in a follow-up PR. This is a pure future addition that works across all supported platforms and does not affect BC.
Builds on top of #171 and #172