Skip to content

[CP] Do not throw during InternetAddress.tryParse #52487

Closed
@brianquinlan

Description

@brianquinlan

Commit(s) to merge

14cb98e

Target

stable

Prepared changelist for beta/stable

https://dart-review.googlesource.com/c/sdk/+/305041

Issue Description

The issue is that some users are debugging their applications with "Break on all exceptions" enabled. Dart 3.0 changed the behavior of HttpClient so that InternetAddress.tryParse is used. This method uses exceptions as part of its implementation, which provokes a debugger break that is confusing to some users.

This occurs on all platforms.

What is the fix

The fix is to not use exceptions internally in InternetAddress.tryParse.

Why cherry-pick

The reason to not cherry pick this PR is because the original implementation is correct.

But, despite heroic attempts by @DanTup, some users were unconvinced and fixing this ASAP seems like the most practical thing to do.

Risk

low

Issue link(s)

flutter/flutter#126650, #52423

Extra Info

No response

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions