com.buck.commons.exceptions
Class Exceptions
java.lang.Object
com.buck.commons.exceptions.Exceptions
public final class Exceptions
- extends Object
Provides general exception utility methods.
- Author:
- Robert J. Buck
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Exceptions
public Exceptions()
toStringAllCauses
public static String toStringAllCauses(Throwable what)
- Prepares an exception for display by concatenating all causation messages
into one string. This method could be used for logs where stack traces
are to be avoided.
- Parameters:
what - the exception for which to prepare a concatenated message
- Returns:
- the concatenated causation message
toStringAllCauses
public static String toStringAllCauses(Throwable what,
int depth)
- Prepares an exception for display by concatenating all causation messages
into one string. This method could be used for logs where stack traces
are to be avoided.
- Parameters:
what - the exception for which to prepare a concatenated messagedepth - the stack depth to which causation messages are
concatenated
- Returns:
- the concatenated causation message
Copyright © 2013. All Rights Reserved.