1 2 24 25 package com.lutris.util; 26 27 import java.io.PrintWriter ; 28 import java.io.StringWriter ; 29 30 36 public class ExceptionUtils { 37 38 41 private ExceptionUtils() { 42 } 43 44 45 53 public static String describeException(Exception e) { 54 StringWriter sw = new StringWriter (); 55 PrintWriter pw = new PrintWriter (sw); 56 pw.println(e); 57 e.printStackTrace(pw); 58 return sw.toString(); 59 } 60 } 61 62 | Popular Tags |