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

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

Issue 2069303002: Add new Cronet exception class for QUIC errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: header 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
(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} which contains a detailed
9 * <a href="https://www.chromium.org/quic">QUIC</a> error code from <a
10 * href=https://cs.chromium.org/chromium/src/net/quic/quic_protocol.h?type=cs&q= %22enum+QuicErrorCode+%7B%22+file:src/net/quic/quic_protocol.h>
11 * QuicErrorCode</a>. An instance of {@code QuicException} is passed to {@code o nFailed} callbacks
12 * when the error code is {@link UrlRequestException#ERROR_QUIC_PROTOCOL_FAILED
13 * UrlRequestException.ERROR_QUIC_PROTOCOL_FAILED}.
14 */
15 public class QuicException extends CronetException {
16 private final int mQuicDetailedErrorCode;
17
18 /**
19 * Constructs an exception with a specific error.
20 *
21 * @param message explanation of failure.
22 * @param netErrorCode Error code from
23 * <a href=https://chromium.googlesource.com/chromium/src/+/master/net/base/ net_error_list.h>
24 * this list</a>.
25 * @param quicDetailedErrorCode Detailed <a href="https://www.chromium.org/q uic">QUIC</a> error
26 * code from <a
27 * href=https://cs.chromium.org/chromium/src/net/quic/quic_protocol.h?type=c s&q=%22enum+QuicErrorCode+%7B%22+file:src/net/quic/quic_protocol.h>
28 * QuicErrorCode</a>.
29 */
30 public QuicException(String message, int netErrorCode, int quicDetailedError Code) {
31 super(message, ERROR_QUIC_PROTOCOL_FAILED, netErrorCode);
32 mQuicDetailedErrorCode = quicDetailedErrorCode;
33 }
34
35 /**
36 * Returns the <a href="https://www.chromium.org/quic">QUIC</a> error code, which is a value
37 * from <a
38 * href=https://cs.chromium.org/chromium/src/net/quic/quic_protocol.h?type=c s&q=%22enum+QuicErrorCode+%7B%22+file:src/net/quic/quic_protocol.h>
39 * QuicErrorCode</a>.
40 */
41 public int getQuicDetailedErrorCode() {
42 return mQuicDetailedErrorCode;
43 }
44 }
OLDNEW
« no previous file with comments | « components/cronet/android/BUILD.gn ('k') | components/cronet/android/api/src/org/chromium/net/UrlRequestException.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698