• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 The Chromium Authors
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 NetworkException} which contains a detailed
9  * <a href="https://www.chromium.org/quic">QUIC</a> error code from <a
10  * href="https://cs.chromium.org/search/?q=symbol:%5CbQuicErrorCode%5Cb"> QuicErrorCode</a>. An
11  * instance of {@code QuicException} is passed to {@code onFailed} callbacks when the error code is
12  * {@link NetworkException#ERROR_QUIC_PROTOCOL_FAILED NetworkException.ERROR_QUIC_PROTOCOL_FAILED}.
13  */
14 public abstract class QuicException extends NetworkException {
15     /**
16      * Constructs an exception that is caused by a QUIC protocol error.
17      *
18      * @param message explanation of failure.
19      * @param cause the cause (which is saved for later retrieval by the {@link
20      * java.io.IOException#getCause getCause()} method). A null value is permitted, and indicates
21      * that the cause is nonexistent or unknown.
22      */
QuicException(String message, Throwable cause)23     protected QuicException(String message, Throwable cause) {
24         super(message, cause);
25     }
26 
27     /**
28      * Returns the <a href="https://www.chromium.org/quic">QUIC</a> error code, which is a value
29      * from <a href="https://cs.chromium.org/search/?q=symbol:%5CbQuicErrorCode%5Cb">
30      * QuicErrorCode</a>.
31      */
getQuicDetailedErrorCode()32     public abstract int getQuicDetailedErrorCode();
33 }
34