Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: components/cronet/android/api/src/org/chromium/net/UrlRequestException.java

Issue 2069303002: Add new Cronet exception class for QUIC errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Switch to using NetError Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.net; 5 package org.chromium.net;
6 6
7 import java.io.IOException; 7 import java.io.IOException;
8 8
9 /** 9 /**
10 * Exception passed to {@link UrlRequest.Callback#onFailed UrlRequest.Callback.o nFailed()} when: 10 * Exception passed to {@link UrlRequest.Callback#onFailed UrlRequest.Callback.o nFailed()} when:
11 * <ul> 11 * <ul>
12 * <li>{@link UrlRequest.Callback} or {@link UploadDataProvider} method throws a n exception. In this 12 * <li>{@link UrlRequest.Callback} or {@link UploadDataProvider} method throws a n exception. In this
13 * case {@link IOException#getCause getCause()} can be used to find the thro wn exception. 13 * case {@link IOException#getCause getCause()} can be used to find the thro wn exception.
14 * {@link #getErrorCode} will return {@link #ERROR_LISTENER_EXCEPTION_THROWN }. 14 * {@link #getErrorCode} will return {@link #ERROR_LISTENER_EXCEPTION_THROWN }.
15 * <li>Cronet fails to process a network request. In this case 15 * <li>Cronet fails to process a network request. In this case
16 * {@link #getErrorCode} and {@link #getCronetInternalErrorCode} can be used to get more 16 * {@link #getErrorCode} and {@link #getCronetInternalErrorCode} can be used to get more
17 * information about the specific type of failure. 17 * information about the specific type of failure. If {@link #getCronetInter nalErrorCode}
18 * returns QUIC_PROTOCOL_ERROR, this exception can be cast to a {@link QuicE xception}
pauljensen 2016/06/30 17:35:12 It's quite awkward to reference a value here witho
mgersh 2016/06/30 22:55:53 Done. (Was the different name just to avoid saying
19 * which can provide further details.
18 * </ul> 20 * </ul>
19 */ 21 */
20 public class UrlRequestException extends IOException { 22 public class UrlRequestException extends IOException {
21 /** 23 /**
22 * Error code indicating this class wraps an exception thrown by {@link UrlR equest.Callback} or 24 * Error code indicating this class wraps an exception thrown by {@link UrlR equest.Callback} or
23 * {@link UploadDataProvider}. Wrapped exception can be retrieved using 25 * {@link UploadDataProvider}. Wrapped exception can be retrieved using
24 * {@link IOException#getCause}. 26 * {@link IOException#getCause}.
25 */ 27 */
26 public static final int ERROR_LISTENER_EXCEPTION_THROWN = 28 public static final int ERROR_LISTENER_EXCEPTION_THROWN =
27 UrlRequestError.LISTENER_EXCEPTION_THROWN; 29 UrlRequestError.LISTENER_EXCEPTION_THROWN;
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 return false; 150 return false;
149 case ERROR_NETWORK_CHANGED: 151 case ERROR_NETWORK_CHANGED:
150 case ERROR_TIMED_OUT: 152 case ERROR_TIMED_OUT:
151 case ERROR_CONNECTION_CLOSED: 153 case ERROR_CONNECTION_CLOSED:
152 case ERROR_CONNECTION_TIMED_OUT: 154 case ERROR_CONNECTION_TIMED_OUT:
153 case ERROR_CONNECTION_RESET: 155 case ERROR_CONNECTION_RESET:
154 return true; 156 return true;
155 } 157 }
156 } 158 }
157 } 159 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698