• 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  * Exception passed to {@link UrlRequest.Callback#onFailed UrlRequest.Callback.onFailed()} when
9  * {@link UrlRequest.Callback} or {@link UploadDataProvider} method throws an exception. In this
10  * case {@link java.io.IOException#getCause getCause()} can be used to find the thrown exception.
11  */
12 public abstract class CallbackException extends CronetException {
13     /**
14      * Constructs an exception that wraps {@code cause} thrown by a {@link UrlRequest.Callback}.
15      *
16      * @param message explanation of failure.
17      * @param cause exception thrown by {@link UrlRequest.Callback} that's being wrapped. It is
18      *         saved
19      * for later retrieval by the {@link java.io.IOException#getCause getCause()}.
20      */
CallbackException(String message, Throwable cause)21     protected CallbackException(String message, Throwable cause) {
22         super(message, cause);
23     }
24 }
25