public class NamedProviderGetException extends AnchorCombinableException
NamedProvider
.Constructor and Description |
---|
NamedProviderGetException(String key,
Throwable cause)
Create with a particular cause.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
canExceptionBeCombined(Throwable exception)
Can another exception be combined with this exception?
|
protected boolean |
canExceptionBeSkipped(Throwable exception)
Can another exception be skipped, when we combine with the current exception?
|
protected String |
createMessageForDescription(String description)
Creates a message for the exception from the description.
|
static NamedProviderGetException |
nonExistingItem(String key)
Creates using a standard-error message for a non-existing item
|
static NamedProviderGetException |
nonExistingItem(String key,
String providerName)
Like
nonExistingItem(String) but with a message that also includes a
user-friendly-name for the NamedProvider . |
Throwable |
summarize()
Creates a new {link Throwable} that summarizes this exception and any nested causes of the
exception.
|
combineDescriptionsRecursively, findMostDeepCombinableException, getDescription, hasNoCombinableNestedExceptions
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public static NamedProviderGetException nonExistingItem(String key)
key
- the key used for the get query, which caused this exception to be thrown.GetOperationFailedException
as cause.public static NamedProviderGetException nonExistingItem(String key, String providerName)
nonExistingItem(String)
but with a message that also includes a
user-friendly-name for the NamedProvider
.key
- the key used for the get query, which caused this exception to be thrown.providerName
- user-friendly name for the NamedProvider
that caused this
exception to be thrown.GetOperationFailedException
as cause.protected boolean canExceptionBeCombined(Throwable exception)
AnchorCombinableException
canExceptionBeCombined
in class AnchorCombinableException
exception
- the other exception to check if it can be combined.protected boolean canExceptionBeSkipped(Throwable exception)
AnchorCombinableException
canExceptionBeSkipped
in class AnchorCombinableException
exception
- the other exception to check if it can be skipped.public Throwable summarize()
AnchorCombinableException
This can effectively combine a chain of nested exceptions into a single exception without a cause.
summarize
in class AnchorCombinableException
protected String createMessageForDescription(String description)
AnchorCombinableException
createMessageForDescription
in class AnchorCombinableException
description
- either a single description, or a combined descriptionCopyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.