17aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller/*
27aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller * Copyright (C) 2015 Square, Inc.
37aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller *
47aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller * Licensed under the Apache License, Version 2.0 (the "License");
57aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller * you may not use this file except in compliance with the License.
67aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller * You may obtain a copy of the License at
77aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller *
87aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller *      http://www.apache.org/licenses/LICENSE-2.0
97aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller *
107aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller * Unless required by applicable law or agreed to in writing, software
117aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller * distributed under the License is distributed on an "AS IS" BASIS,
127aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
137aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller * See the License for the specific language governing permissions and
147aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller * limitations under the License.
157aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller */
167aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fullerpackage com.squareup.okhttp.internal.http;
177aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller
187aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fullerimport java.io.IOException;
197aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller
207aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller/**
217aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller * Indicates a problem with interpreting a request. It may indicate there was a problem with the
227aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller * request itself, or the environment being used to interpret the request (network failure, etc.).
237aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller */
247aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fullerpublic final class RequestException extends Exception {
257aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller
267aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller  public RequestException(IOException cause) {
277aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller    super(cause);
287aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller  }
297aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller
307aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller  @Override
317aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller  public IOException getCause() {
327aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller    return (IOException) super.getCause();
337aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller  }
347aeaaefc891f6221f4b2cce536b1c1e816e09794Neil Fuller}
35