BAEL-4844: Adding support for tracing exceptional occurrences.

This commit is contained in:
bhandy 2021-04-21 07:20:25 -04:00
parent f73a249836
commit 883e612d45
1 changed files with 8 additions and 4 deletions

View File

@ -11,9 +11,13 @@ public aspect TracingAspect {
Object around() : traceAnnotatedClasses() {
String signature = thisJoinPoint.getSignature().toShortString();
LOG.trace("Entering " + signature);
Object returnValue = proceed();
LOG.trace("Exiting " + signature);
return returnValue;
try {
return proceed();
} catch (Exception e) {
LOG.trace("Exception thrown from " + signature, e);
throw e;
} finally {
LOG.trace("Exiting " + signature);
}
}
}