private static String appendDetail(String detail) {
        if (detail == null) {
            return "";
        }
        return detail + "\n";
    }
Unwrap an exception and log it if required.
stroom-util/src/main/java/stroom/util/EntityServiceExceptionUtil.java