

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

# Perubahan pengecualian
<a name="migration-exception-changes"></a>

Nama kelas pengecualian, strukturnya, dan hubungannya telah berubah. `software.amazon.awssdk.core.exception.SdkException`adalah `Exception` kelas dasar baru yang diperluas oleh semua pengecualian lainnya.

Tabel ini memetakan perubahan nama kelas pengecualian.


| 1.x | 2.x | 
| --- | --- | 
|  `com.amazonaws.SdkBaseException` `com.amazonaws.AmazonClientException`  |  `software.amazon.awssdk.core.exception.SdkException`  | 
|  `com.amazonaws.SdkClientException`  |  `software.amazon.awssdk.core.exception.SdkClientException`  | 
|  `com.amazonaws.AmazonServiceException`  |  `software.amazon.awssdk.awscore.exception.AwsServiceException`  | 

Tabel berikut memetakan metode pada kelas pengecualian antara versi 1.x dan 2.x.


| 1.x | 2.x | 
| --- | --- | 
|  `AmazonServiceException.getRequestId`  |  `SdkServiceException.requestId`  | 
|  `AmazonServiceException.getServiceName`  |  `AwsServiceException.awsErrorDetails().serviceName`  | 
|  `AmazonServiceException.getErrorCode`  |  `AwsServiceException.awsErrorDetails().errorCode`  | 
|  `AmazonServiceException.getErrorMessage`  |  `AwsServiceException.awsErrorDetails().errorMessage`  | 
|  `AmazonServiceException.getStatusCode`  |  `AwsServiceException.awsErrorDetails().sdkHttpResponse().statusCode`  | 
|  `AmazonServiceException.getHttpHeaders`  |  `AwsServiceException.awsErrorDetails().sdkHttpResponse().headers`  | 
|  `AmazonServiceException.rawResponse`  |  `AwsServiceException.awsErrorDetails().rawResponse`  | 