package com.alexrnl.commons.error;

import java.util.Objects;
import java.util.logging.Logger;

/**
 * TODO
 * @author Alex
 */
public final class ExceptionUtils {
	/** Logger */
	private static Logger	lg	= Logger.getLogger(ExceptionUtils.class.getName());
	
	/**
	 * Constructor #1.<br />
	 * Default private constructor.
	 */
	private ExceptionUtils () {
		super();
	}
	
	/**
	 * 
	 * @param e
	 *        the throwable object to display.
	 * @return a {@link String} containing the class and the message of the exception.
	 * @throws NullPointerException
	 *         if the {@link Throwable} is <code>null</code>.
	 */
	public static String displayClassAndMessage (final Throwable e) throws NullPointerException {
		Objects.requireNonNull(e);
		return e.getClass() + "; " + e.getMessage();
	}
}

@@ -50,62 +50,77 @@
 til.
-Objects;%0Aimport java.util.logging.Logger;%0A%0A/**%0A * TODO
+logging.Logger;%0A%0A/**%0A * Utility methods for exception handling.%3Cbr /%3E
 %0A * 
@@ -390,16 +390,134 @@
 /**%0A%09 * 
+Print a nice message with the %7B@link Class%7D and the %7B@link Throwable#getMessage() message%7D%0A%09 * of the exception.%3Cbr /%3E
 %0A%09 * @pa
@@ -657,225 +657,183 @@
 %0A%09 *
- @throws NullPointerException%0A%09 *         if the %7B@link Throwable%7D is %3Ccode%3Enull%3C/code%3E.%0A%09 */%0A%09public static String displayClassAndMessage (final Throwable e) throws NullPointerException %7B%0A%09%09Objects.requireNonNull(e);
+/%0A%09public static String displayClassAndMessage (final Throwable e) %7B%0A%09%09if (e == null) %7B%0A%09%09%09lg.warning(%22Cannot display null exception.%22);%0A%09%09%09return %22null exception caught%22;%0A%09%09%7D
 %0A%09%09r

Complete javadoc and don't throw NPE