Chromium Code Reviews| Index: components/cronet/android/api/src/org/chromium/net/UrlRequestException.java |
| diff --git a/components/cronet/android/api/src/org/chromium/net/UrlRequestException.java b/components/cronet/android/api/src/org/chromium/net/UrlRequestException.java |
| index 92201aa32471128ce721a81cab80fbf8b061f73b..90ac3dd9c89265180d5213e68bbb9818ec20deb4 100644 |
| --- a/components/cronet/android/api/src/org/chromium/net/UrlRequestException.java |
| +++ b/components/cronet/android/api/src/org/chromium/net/UrlRequestException.java |
| @@ -14,7 +14,9 @@ import java.io.IOException; |
| * {@link #getErrorCode} will return {@link #ERROR_LISTENER_EXCEPTION_THROWN}. |
| * <li>Cronet fails to process a network request. In this case |
| * {@link #getErrorCode} and {@link #getCronetInternalErrorCode} can be used to get more |
| - * information about the specific type of failure. |
| + * information about the specific type of failure. If {@link #getCronetInternalErrorCode} |
| + * returns {@link #QUIC_PROTOCOL_ERROR}, this exception can be cast to a {@link QuicException} |
| + * which can provide further details. |
| * </ul> |
| */ |
| public class UrlRequestException extends IOException { |
| @@ -69,6 +71,13 @@ public class UrlRequestException extends IOException { |
| */ |
| public static final int ERROR_OTHER = UrlRequestError.OTHER; |
| + /** |
| + * Error code indicating an error during a QUIC connection. Unlike the ERROR_* constants, this |
| + * will appear as a return value from {@link #getCronetInternalErrorCode}, not |
| + * {@link #getErrorCode}. |
| + */ |
| + public static final int QUIC_PROTOCOL_ERROR = -356; |
|
xunjieli
2016/06/30 14:13:43
We can just reuse NetError.ERR_QUIC_PROTOCOL_ERROR
mgersh
2016/06/30 16:50:53
Done.
|
| + |
| // Error code, one of ERROR_* |
| private final int mErrorCode; |
| // Cronet internal error code. |