added a try catch block to the getTitle method in the event that the individual cannot be found. This happens regularly on VIVO Cornell as the result of bots.

This commit is contained in:
tworrall 2012-02-07 17:52:33 +00:00
parent 1227b8fd4d
commit 4cc337ab26

View file

@ -52,7 +52,12 @@ public class ExportQrCodeController extends FreemarkerHttpServlet {
@Override
protected String getTitle(String siteName, VitroRequest vreq) {
try {
return "Export QR Code for " + getIndividualFromRequest(vreq).getRdfsLabel();
} catch (Throwable e) {
log.error(e, e);
return "There was an error in the system. The individual could not be found";
}
}
}