Chromium Code Reviews| Index: runtime/bin/http_impl.dart |
| diff --git a/runtime/bin/http_impl.dart b/runtime/bin/http_impl.dart |
| index 836a9439d908bf48431a1a58f538cc309e581166..96d4373b2f8b994a8aae25c00bdf45f5c22ffaec 100644 |
| --- a/runtime/bin/http_impl.dart |
| +++ b/runtime/bin/http_impl.dart |
| @@ -1262,6 +1262,8 @@ class _HttpClientConnection |
| if (e != null) { |
| if (_onErrorCallback != null) { |
| _onErrorCallback(e); |
| + } else { |
| + throw e; |
| } |
| } |
| _closing = true; |
| @@ -1366,6 +1368,9 @@ class _HttpClient implements HttpClient { |
| HttpClientConnection open( |
| String method, String host, int port, String path) { |
| if (_shutdown) throw new HttpException("HttpClient shutdown"); |
| + if (method == null || host == null || port == null || path == null) { |
| + throw new NullPointerException(); |
|
Mads Ager (google)
2012/05/03 13:36:28
We could throw a more descriptive error here? Not
Søren Gjesse
2012/05/07 11:42:31
Changed to IllegalArgumentException.
Arguments ar
|
| + } |
| return _prepareHttpClientConnection(host, port, method, path); |
| } |