posted 15 years ago
Hi All,
I am using Spring AOP for logging purpose in my application. I am using the ThrowsAdvice interface and implementing the afterThrowing(Method m, Object[] args, Object target, Throwable ex) method to invoke my wrapper log4j class.
However, I have one another requirement. For each of the exception thrown I need to log a predefined custom error code to the log file. There will be a unique error code for each type of exception scenerio.
Is there any way that I can pass this custom error code from my class to the Advice (implmenting the ThrowsAdvice interface)? If AOP supports this, then it would be a clean approach.
Thanks and Regards
P Manchanda