Réorganisation des dépendances + configuration avancée des projets

This commit is contained in:
2016-11-26 19:00:43 +01:00
parent 40942fb25f
commit 13655c1efa
11 changed files with 30 additions and 836 deletions

View File

@@ -0,0 +1,23 @@
package fr.pandacube.java.util;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.PrintStream;
public class ThrowableUtil {
public static String stacktraceToString(Throwable t) {
if (t == null) return null;
try (ByteArrayOutputStream os = new ByteArrayOutputStream()) {
try (PrintStream ps = new PrintStream(os, false, "UTF-8")) {
t.printStackTrace(ps);
ps.flush();
}
return os.toString("UTF-8");
} catch (IOException e) {
return null;
}
}
}