@InternalApi
public final class StorageException
extends com.google.cloud.http.BaseHttpServiceException
Constructor and Description |
---|
StorageException(com.google.api.client.googleapis.json.GoogleJsonError error) |
StorageException(int code,
String message) |
StorageException(int code,
String message,
String reason,
Throwable cause) |
StorageException(int code,
String message,
Throwable cause) |
StorageException(IOException exception) |
Modifier and Type | Method and Description |
---|---|
static StorageException |
translate(IOException exception)
Translate IOException to a StorageException representing the cause of the error.
|
static StorageException |
translateAndThrow(com.google.cloud.RetryHelper.RetryHelperException ex)
Translate RetryHelperException to the StorageException that caused the error.
|
equals, getCode, getDebugInfo, getLocation, getReason, hashCode, isRetryable, isRetryable, isRetryable, translate, translate
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public StorageException(int code, String message)
public StorageException(IOException exception)
public StorageException(com.google.api.client.googleapis.json.GoogleJsonError error)
public static StorageException translateAndThrow(com.google.cloud.RetryHelper.RetryHelperException ex)
StorageException
- when ex
was caused by a StorageException
public static StorageException translate(IOException exception)
true
. Additionally, this method translates
transient issues Connection Closed Prematurely as a retryable error.StorageException
Copyright © 2023 Google LLC. All rights reserved.