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:
parent
1227b8fd4d
commit
4cc337ab26
1 changed files with 6 additions and 1 deletions
|
@ -52,7 +52,12 @@ public class ExportQrCodeController extends FreemarkerHttpServlet {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getTitle(String siteName, VitroRequest vreq) {
|
protected String getTitle(String siteName, VitroRequest vreq) {
|
||||||
return "Export QR Code for " + getIndividualFromRequest(vreq).getRdfsLabel();
|
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";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue