Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a better toString to _ClientSocketException #948

Merged

Conversation

brianquinlan
Copy link
Collaborator

Also explain how to catch SocketException.

Fixes #930

  • Thanks for your contribution! Please replace this bullet-point with a description of what this PR is changing or adding and why; list any relevant issues, and review the contribution guidelines below

  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.

Contribution guidelines:

(note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback)

Sorry, something went wrong.

Also explain how to catch `SocketException`.

Fixes dart-lang#930
Copy link
Member

@natebosch natebosch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to bump to a -wip version in the pubspec. May also be worth a changelog entry.

@@ -25,6 +25,10 @@ import 'streamed_response.dart';
/// [http.head], [http.get], [http.post], [http.put], [http.patch], or
/// [http.delete] instead.
///
/// All methods will emit a [ClientException] if there is a transport-level
/// failure when communication with the server, e.g., if the server could not
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

///
/// If there is a socket-level failure when communicating with the server
/// (e.g. if the server could not be reached), [IOClient] will emit a
/// [ClientException] that is also implements [SocketException]. This allows
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// [ClientException] that is also implements [SocketException]. This allows
/// [ClientException] that also implements [SocketException]. This allows

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@brianquinlan
Copy link
Collaborator Author

Need to bump to a -wip version in the pubspec. May also be worth a changelog entry.

Done.

@brianquinlan brianquinlan merged commit 8a4a4a6 into dart-lang:master May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

_ClientSocketException should have a better toString
2 participants