}
stringBuilder.append(newLine).append(newLine);
}
if (exception instanceof DkException)
{
final DkException gwtlibException = (DkException) exception;
stringBuilder.append("Server Error Context: ").append(newLine);
for (final Entry<String, String> entry : gwtlibException.getContext().getContextMap().entrySet())
{
stringBuilder.append(entry.getKey()).append(": ").append(entry.getValue()).append(newLine);
}
stringBuilder.append(newLine).append(newLine);
}
if (exception.getMessage() != null)
{
stringBuilder.append("Exception Message: ");
}
if (exception instanceof DkException)
{
final DkException gwtlibException = (DkException) exception;
final Iterator<Couple<String, List<String>>> it = gwtlibException.getContext().getStackTrace().iterator();
while (it.hasNext())
{
final Couple<String, List<String>> couple = it.next();
stringBuilder.append(couple.first).append(newLine);
for (final String stackTraceElement : couple.second)