Small cleanups / changes amassed over time

- Small javadoc fixes
- Simplifications
- Move logException method from StringUtils to ExceptionUtils
This commit is contained in:
ljacqu
2018-04-22 12:45:34 +02:00
parent baec034909
commit ecaffbabfc
13 changed files with 44 additions and 61 deletions
@@ -33,4 +33,14 @@ public final class ExceptionUtils {
}
return null;
}
/**
* Format the information from a Throwable as string, retaining the type and its message.
*
* @param th the throwable to process
* @return string with the type of the Throwable and its message, e.g. "[IOException]: Could not open stream"
*/
public static String formatException(Throwable th) {
return "[" + th.getClass().getSimpleName() + "]: " + th.getMessage();
}
}