Index: lib/src/exception.dart |
diff --git a/lib/src/exception.dart b/lib/src/exception.dart |
index d06dc60e9db21eda7179cdcfeb77ff991b450890..47545ede721cd24b78f1d29f0027edee376c2782 100644 |
--- a/lib/src/exception.dart |
+++ b/lib/src/exception.dart |
@@ -11,7 +11,11 @@ class WebSocketChannelException implements Exception { |
/// The exception that caused this one, if available. |
final inner; |
- WebSocketChannelException([this.message, this.inner]); |
+ WebSocketChannelException([this.message]) : inner = null; |
+ |
+ WebSocketChannelException.from(inner) |
+ : message = inner.toString(), |
+ inner = inner; |
String toString() => message == null |
? "WebSocketChannelException" : |