Chromium Code Reviews| Index: components/cronet/android/api/src/org/chromium/net/QuicException.java |
| diff --git a/components/cronet/android/api/src/org/chromium/net/QuicException.java b/components/cronet/android/api/src/org/chromium/net/QuicException.java |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e355c26b845d0e1779a52f752fee9be1464cdb9d |
| --- /dev/null |
| +++ b/components/cronet/android/api/src/org/chromium/net/QuicException.java |
| @@ -0,0 +1,47 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +package org.chromium.net; |
| + |
| +/** |
| + * Subclass of {@link UrlRequestException} (through {@link CronetException}) which contains a |
|
pauljensen
2016/07/01 12:22:02
I don't think we need to mention CronetException..
mgersh
2016/07/01 15:21:15
Done.
|
| + * detailed <a href="https://www.chromium.org/quic">QUIC</a> error code from |
| + * <a href=https://chromium.googlesource.com/chromium/src/+/master/net/quic/quic_protocol.h#503> |
|
pauljensen
2016/07/01 12:22:02
Line 503 is already incorrect.
I was going to sugg
mgersh
2016/07/01 15:21:15
Huh, cool. Done.
|
| + * this file</a>. |
| + * An instance of QuicException is passed to |
|
pauljensen
2016/07/01 12:22:02
can this go on prior line?
pauljensen
2016/07/01 12:22:02
QuicException->{@code QuicException}
mgersh
2016/07/01 15:21:15
You mean I can't just solve all my formatting prob
mgersh
2016/07/01 15:21:15
Done.
|
| + * {@link UrlRequest.Callback#onFailed UrlRequest.Callback.onFailed()} when the error code is |
|
pauljensen
2016/07/01 12:22:02
I'm not sure we should mention UrlRequest here as
mgersh
2016/07/01 15:21:15
Done.
|
| + * {@link UrlRequestException#ERROR_QUIC_PROTOCOL_FAILED |
| + * UrlRequestException.ERROR_QUIC_PROTOCOL_FAILED}. |
| + */ |
| +public class QuicException extends CronetException { |
| + // QUIC detailed error code |
|
pauljensen
2016/07/01 12:22:02
Remove this comment as it is redundant with the ni
mgersh
2016/07/01 15:21:15
Done. I agree with you that it's weird, I just did
|
| + private final int mQuicDetailedErrorCode; |
| + |
| + /** |
| + * Constructs an exception with a specific error. |
| + * |
| + * @param message explanation of failure. |
| + * @param netErrorCode Error code from |
| + * <a href=https://chromium.googlesource.com/chromium/src/+/master/net/base/net_error_list.h> |
| + * this list</a>. |
| + * @param quicDetailedErrorCode Detailed <a href="https://www.chromium.org/quic">QUIC</a> error |
| + * code from |
| + * <a href=https://chromium.googlesource.com/chromium/src/+/master/net/quic/quic_protocol.h#503> |
|
pauljensen
2016/07/01 12:22:02
Update URL as per line 10 comment
mgersh
2016/07/01 15:21:15
Done.
|
| + * this file</a>. |
| + */ |
| + public QuicException(String message, int netErrorCode, int quicDetailedErrorCode) { |
| + super(message, ERROR_QUIC_PROTOCOL_FAILED, netErrorCode); |
| + mQuicDetailedErrorCode = quicDetailedErrorCode; |
| + } |
| + |
| + /** |
| + * Returns the <a href="https://www.chromium.org/quic">QUIC</a> error code, which is a value |
| + * from |
| + * <a href=https://chromium.googlesource.com/chromium/src/+/master/net/quic/quic_protocol.h> |
|
pauljensen
2016/07/01 12:22:02
update URL as per line 10 comment
mgersh
2016/07/01 15:21:15
Done.
|
| + * QuicErrorCode</a>. |
|
pauljensen
2016/07/01 12:22:02
please make this consistent with the other two ref
mgersh
2016/07/01 15:21:15
Done.
|
| + */ |
| + public int getQuicDetailedErrorCode() { |
| + return mQuicDetailedErrorCode; |
| + } |
| +} |