public class Exceptions extends Object
Modifier and Type | Field and Description |
---|---|
static Throwable[] |
EMPTY_THROWABLES |
Constructor and Description |
---|
Exceptions() |
Modifier and Type | Method and Description |
---|---|
static void |
printNestedThrowables(ExceptionInfo e,
PrintStream out)
Print the stack trace of the exception's nested throwables.
|
static void |
printNestedThrowables(ExceptionInfo e,
PrintWriter out)
Print the stack trace of the exception's nested throwables.
|
static Object |
replaceFailedObject(Object ob)
Convert the specified failed object into a serializable
object for when we are serializing an Exception.
|
static Throwable[] |
replaceNestedThrowables(Throwable[] nested)
Convert the specified throwables into a serialzable array.
|
static String |
toClassName(Class<?> cls) |
static String |
toClassNames(Collection<? extends Class<?>> classes) |
static String |
toString(Collection failed)
Safely stringify the given objects.
|
static String |
toString(ExceptionInfo e)
Stringify the given exception.
|
static String |
toString(Object ob)
Safely stringify the given object.
|
public static final Throwable[] EMPTY_THROWABLES
public static String toString(Collection failed)
public static String toString(ExceptionInfo e)
public static void printNestedThrowables(ExceptionInfo e, PrintStream out)
public static void printNestedThrowables(ExceptionInfo e, PrintWriter out)
public static Object replaceFailedObject(Object ob)
ob
- the object to convertpublic static Throwable[] replaceNestedThrowables(Throwable[] nested)
public static String toClassNames(Collection<? extends Class<?>> classes)
Copyright © 2006–2017 Apache Software Foundation. All rights reserved.