Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 package org.chromium.net; | |
| 6 | |
| 7 /** | |
| 8 * Subclass of {@link UrlRequestException} (through {@link CronetException}) whi ch contains a | |
| 9 * detailed QUIC error code from | |
|
pauljensen
2016/06/30 17:35:12
I'd recommend linkifying QUIC here and on line 37
mgersh
2016/06/30 22:55:52
Done.
| |
| 10 * <a href=https://chromium.googlesource.com/chromium/src/+/master/net/quic/quic _protocol.h#503> | |
| 11 * this file</a>. | |
| 12 * An instance of QuicException is passed to | |
| 13 * {@link UrlRequest.Callback#onFailed UrlRequest.Callback.onFailed()} when the net error code is | |
| 14 * QUIC_PROTOCOL_ERROR. | |
| 15 */ | |
| 16 public class QuicException extends CronetException { | |
| 17 // QUIC detailed error code | |
| 18 private final int mQuicDetailedErrorCode; | |
| 19 | |
| 20 /** | |
| 21 * Constructs an exception with a specific error. | |
| 22 * | |
| 23 * @param message explanation of failure. | |
| 24 * @param netErrorCode Error code from | |
| 25 * <a href=https://chromium.googlesource.com/chromium/src/+/master/net/base/ net_error_list.h> | |
| 26 * this list</a>. | |
| 27 * @param quicDetailedErrorCode Detailed QUIC error code from | |
| 28 * <a href=https://chromium.googlesource.com/chromium/src/+/master/net/quic/ quic_protocol.h#503> | |
| 29 * this file</a>. | |
| 30 */ | |
| 31 public QuicException(String message, int netErrorCode, int quicDetailedError Code) { | |
| 32 super(message, ERROR_OTHER, netErrorCode); | |
| 33 mQuicDetailedErrorCode = quicDetailedErrorCode; | |
| 34 } | |
| 35 | |
| 36 /** | |
| 37 * Returns the QUIC error code, which is a value from | |
| 38 * <a href=https://chromium.googlesource.com/chromium/src/+/master/net/quic/ quic_protocol.h> | |
| 39 * QuicErrorCode</a>. | |
| 40 */ | |
| 41 public int getQuicDetailedErrorCode() { | |
| 42 return mQuicDetailedErrorCode; | |
| 43 } | |
| 44 } | |
| OLD | NEW |