Announcement Announcement Module
Collapse
No announcement yet.
How to avoid logging caught exception using AOP? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to avoid logging caught exception using AOP?

    Hi,

    In a nutshell i am trying to avoid logging the caught exceptions at pointcut.

    I am using @AfterThrowing to log the exceptions happening in the system and from my understanding regardless of the exceptions is caught or not the aspect executes and do its' work(in this case loging). what i dont want to do is not to log any exceptions which is caught in the applciation. is there anyway i can do that? or my understanding is wrong?

    any help to make me understand better is appreciated.

    ta
    venkatesh

  • #2
    I'm not sure if AOP is good for this. Java 5 provides the Thread.UncaughtExceptionHandler interface for this purpose.

    Cheers

    Comment


    • #3
      Thanks Chelu,

      i never used Thread.UncaughtExceptionHandler before. will have a look at it.

      ta
      venkatesh

      Comment

      Working...
      X