Enabling more general exception to be logged and caught in makeIndividual method
This commit is contained in:
parent
0a78ab5687
commit
a133ed206e
1 changed files with 9 additions and 0 deletions
|
@ -78,6 +78,15 @@ public class IndividualDaoSDB extends IndividualDaoJena {
|
||||||
} catch (IndividualNotFoundException e) {
|
} catch (IndividualNotFoundException e) {
|
||||||
// If the individual does not exist, return null.
|
// If the individual does not exist, return null.
|
||||||
return null;
|
return null;
|
||||||
|
} catch(Exception ex) {
|
||||||
|
//Should some other error occur, please log it here
|
||||||
|
log.error("An error occurred trying to make an individual ", ex);
|
||||||
|
if(StringUtils.isNotEmpty(individualURI)) {
|
||||||
|
log.error("IndividualURI equals " + individualURI);
|
||||||
|
} else {
|
||||||
|
log.error("IndividualURI is null or empty");
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue