1 // Copyright 2015 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 android.net.http; 6 7 import androidx.annotation.Nullable; 8 9 import java.io.IOException; 10 11 /** 12 * Base exception passed to {@link UrlRequest.Callback#onFailed UrlRequest.Callback.onFailed()}. 13 */ 14 public class HttpException extends IOException { 15 /** 16 * Constructs an exception that is caused by {@code cause}. 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 */ HttpException(@ullable String message, @Nullable Throwable cause)23 public HttpException(@Nullable String message, @Nullable Throwable cause) { 24 super(message, cause); 25 } 26 } 27