Jakob Buchgraber | e8f4e5e | 2018-11-30 12:50:22 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"). |
| 5 | * You may not use this file except in compliance with the License. |
| 6 | * A copy of the License is located at |
| 7 | * |
| 8 | * http://aws.amazon.com/apache2.0 |
| 9 | * |
| 10 | * or in the "license" file accompanying this file. This file is distributed |
| 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either |
| 12 | * express or implied. See the License for the specific language governing |
| 13 | * permissions and limitations under the License. |
| 14 | */ |
| 15 | package com.amazonaws; |
| 16 | |
| 17 | /** |
| 18 | * Base exception class for any errors that occur while attempting to use an AWS |
| 19 | * client from AWS SDK for Java to make service calls to Amazon Web Services. |
| 20 | * |
| 21 | * Error responses from services will be handled as AmazonServiceExceptions. |
| 22 | * This class is primarily for errors that occur when unable to get a response |
| 23 | * from a service, or when the client is unable to parse the response from a |
| 24 | * service. For example, if a caller tries to use a client to make a service |
| 25 | * call, but no network connection is present, an AmazonClientException will be |
| 26 | * thrown to indicate that the client wasn't able to successfully make the |
| 27 | * service call, and no information from the service is available. |
| 28 | * |
| 29 | * Note : If the SDK is able to parse the response; but doesn't recognize the |
| 30 | * error code from the service, an AmazonServiceException is thrown |
| 31 | * |
| 32 | * Callers should typically deal with exceptions through AmazonServiceException, |
| 33 | * which represent error responses returned by services. AmazonServiceException |
| 34 | * has much more information available for callers to appropriately deal with |
| 35 | * different types of errors that can occur. |
| 36 | * |
| 37 | * @see AmazonServiceException |
| 38 | */ |
| 39 | public class AmazonClientException extends SdkBaseException { |
| 40 | private static final long serialVersionUID = 1L; |
| 41 | |
| 42 | /** |
| 43 | * Creates a new AmazonClientException with the specified message, and root |
| 44 | * cause. |
| 45 | * |
| 46 | * @param message |
| 47 | * An error message describing why this exception was thrown. |
| 48 | * @param t |
| 49 | * The underlying cause of this exception. |
| 50 | */ |
| 51 | public AmazonClientException(String message, Throwable t) { |
| 52 | super(message, t); |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * Creates a new AmazonClientException with the specified message. |
| 57 | * |
| 58 | * @param message |
| 59 | * An error message describing why this exception was thrown. |
| 60 | */ |
| 61 | public AmazonClientException(String message) { |
| 62 | super(message); |
| 63 | } |
| 64 | |
| 65 | public AmazonClientException(Throwable t) { |
| 66 | super(t); |
| 67 | } |
| 68 | |
| 69 | } |