I have created a throws advice for my command bean (Login.java) for handling exception and logging when exception is thrown from my command.
LoginAction -> Login command
Both action and command is defined in ApplicationContext.xml file as below
When an exception is thrown from my command, my interceptor class (com.xyz.ExceptionInterceptor.java) will be called. I'm throwing NullPointerException from command. I want the exact line of the command class from where exception is thrown.
ex.getClass().getName() prints only "java.lang.NullPointerException"but not the line no.
prints Caught: java.lang.NullPointerException
How do I get the line no in ExceptionInterceptor class?