if (buffer.length() == 0) {
buffer.append("Exception List").append('\n');
}
if (ex instanceof GeocodeException) {
final GeocodeException gcex = (GeocodeException) ex;
buffer.append("Geocode Exception code: " + gcex.getErrorCode())
.append('\n');
} else {
buffer.append("Exception: " + ex).append('\n');
}
}