public enum Throwables extends Enum<Throwables>
Modifier and Type | Method and Description |
---|---|
static RuntimeException |
failure(Throwable t)
Used to help perform common throw-up with minimal wrapping.
|
static RuntimeException |
failure(Throwable t,
String errmsg)
Same as
failure(Throwable) , but the given errmsg will be used if
it was wrapped as either an AmazonClientException or
AbortedException . |
static Throwable |
getRootCause(Throwable orig)
Returns the root cause of the given throwable, or null if the given
throwable is null.
|
static Throwables |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Throwables[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static Throwables[] values()
for (Throwables c : Throwables.values()) System.out.println(c);
public static Throwables valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static Throwable getRootCause(Throwable orig)
public static RuntimeException failure(Throwable t)
public static RuntimeException failure(Throwable t, String errmsg)
failure(Throwable)
, but the given errmsg will be used if
it was wrapped as either an AmazonClientException
or
AbortedException
.Copyright © 2020. All rights reserved.