Index: sdk/lib/io/http_parser.dart |
diff --git a/sdk/lib/io/http_parser.dart b/sdk/lib/io/http_parser.dart |
index 9a2f6b9bfdc0ed40b0ef93a7e71c6d95cd7b61bd..b7a70f541d09635e250bcb6078e02e2d7d8d6eda 100644 |
--- a/sdk/lib/io/http_parser.dart |
+++ b/sdk/lib/io/http_parser.dart |
@@ -123,7 +123,7 @@ class _HttpDetachedIncoming extends Stream<List<int>> { |
} |
StreamSubscription<List<int>> listen(void onData(List<int> event), |
- {void onError(AsyncError error), |
+ {void onError(error), |
void onDone(), |
bool unsubscribeOnError}) { |
return controller.stream.listen( |
@@ -216,7 +216,7 @@ class _HttpParser |
StreamSubscription<_HttpIncoming> listen(void onData(_HttpIncoming event), |
- {void onError(AsyncError error), |
+ {void onError(error), |
void onDone(), |
bool unsubscribeOnError}) { |
return _controller.stream.listen(onData, |
@@ -681,7 +681,7 @@ class _HttpParser |
} |
} catch (e, s) { |
_state = _State.FAILURE; |
- error(new AsyncError(e, s)); |
+ error(e, s); |
} |
_parserCalled = false; |
@@ -713,9 +713,8 @@ class _HttpParser |
!(_state == _State.START && !_requestParser) && |
!(_state == _State.BODY && !_chunked && _transferLength == -1)) { |
_bodyController.addError( |
- new AsyncError( |
- new HttpParserException( |
- "Connection closed while receiving data"))); |
+ new HttpParserException( |
+ "Connection closed while receiving data")); |
} |
_closeIncoming(); |
_controller.close(); |
@@ -724,10 +723,8 @@ class _HttpParser |
// If the connection is idle the HTTP stream is closed. |
if (_state == _State.START) { |
if (!_requestParser) { |
- error( |
- new AsyncError( |
- new HttpParserException( |
- "Connection closed before full header was received"))); |
+ error(new HttpParserException( |
+ "Connection closed before full header was received")); |
} |
_controller.close(); |
return; |
@@ -742,10 +739,8 @@ class _HttpParser |
_state = _State.FAILURE; |
// Report the error through the error callback if any. Otherwise |
// throw the error. |
- error( |
- new AsyncError( |
- new HttpParserException( |
- "Connection closed before full header was received"))); |
+ error(new HttpParserException( |
+ "Connection closed before full header was received")); |
_controller.close(); |
return; |
} |
@@ -756,10 +751,8 @@ class _HttpParser |
_state = _State.FAILURE; |
// Report the error through the error callback if any. Otherwise |
// throw the error. |
- error( |
- new AsyncError( |
- new HttpParserException( |
- "Connection closed before full body was received"))); |
+ error(new HttpParserException( |
+ "Connection closed before full body was received")); |
} |
_controller.close(); |
} |
@@ -931,10 +924,10 @@ class _HttpParser |
} |
} |
- void error(error) { |
+ void error(error, [stackTrace]) { |
if (_socketSubscription != null) _socketSubscription.cancel(); |
_state = _State.FAILURE; |
- _controller.addError(error); |
+ _controller.addError(error, stackTrace); |
_controller.close(); |
} |