package net.mc_pandacraft.java.util.bukkit.logger;

import java.util.logging.Logger;

public class ThrowableUtil {
	
	
	public static void displayErrorMessage(Logger l, Throwable t)
	{
		l.severe(t.toString()+" : "+t.getMessage());
		for (StackTraceElement stackEl : t.getStackTrace())
		{
			l.severe(stackEl.toString());
		}
		if (t.getCause() != null)
			displayErrorMessage(l, t.getCause());
	}
	
	
}
