public static String toString(SQLException e) {
        String curr = exceptionToString(e) + "\nstate:" + e.getSQLState();
        while ((e = e.getNextException()) != null)
            curr += "\n\n" + exceptionToString(e) + "\nstate:" + e.getSQLState();
        return curr;