Mistři v programování na #hovnokod

Java #2127

Who needs conditions when you have exceptions!

DocumentPers document = (DocumentPers) entry.getKey().getData();

String docName = null;
try {
	// Document might not exist in DB, document.getName() can throw exception
	docName = document.getName();
} catch (Exception e) {
	docName = null;
	LOGGER.error(e.getMessage(), e);
}

Anonymous,