public static void debug(Throwable t){
  StringWriter writer=new StringWriter();
  t.printStackTrace(new PrintWriter(writer));
  String str=writer.toString();
  if (str.endsWith("\n"))   str=str.substring(0,str.length() - 2);
  debug(str);
}

public static void debug ( Throwable t ) { StringWriter writer = new StringWriter ( ) ; t . printStackTrace ( new PrintWriter ( writer ) ) ; String str = writer . toString ( ) ; if ( str . endsWith ( "\n" ) ) str = str . substring ( 0 , str . length ( ) - 2 ) ; debug ( str ) ; }
print a debug throwable to the console .
