We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
WebSocketException.toString()
1 parent 3e4cceb commit 7568b5cCopy full SHA for 7568b5c
pkgs/web_socket/lib/src/web_socket.dart
@@ -83,6 +83,15 @@ final class CloseReceived extends WebSocketEvent {
83
class WebSocketException implements Exception {
84
final String message;
85
WebSocketException([this.message = '']);
86
+
87
+ @override
88
+ String toString() {
89
+ if (message.isEmpty) {
90
+ return 'WebSocketException';
91
+ } else {
92
+ return 'WebSocketException: $message';
93
+ }
94
95
}
96
97
/// Thrown if [WebSocket.sendText], [WebSocket.sendBytes], or
0 commit comments