giovedì 20 gennaio 2011

Java StackStrace to String

<code type="java">
catch (Exception e) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);
System.out.println(sw.toString().toUpperCase());
}
</code>

Nessun commento:

Posta un commento