Solved

How to ignore exceptions thrown by Advice class

Posted on 2008-09-30
4
941 Views
Last Modified: 2013-11-11
Say I have an AOP advice method that throws an exception.

I have after-throwing interceptors (multiple) in place to log the exception but after that I wish to catch the exception and ignore it, but only if it eminates from the advice code, and not the original proxied class.

Is there a way to do this so that the exception from the aop advice does not interfere with the operation of the main application, or do I need to set up every advice method with an @Around and handle it within there?

Can I set up a pointcut on Advice methods so that I can trap exceptions only if they occur within the advice methods?
0
Comment
Question by:sweetfa2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 2

Accepted Solution

by:
Thlware earned 500 total points
ID: 22631123
try{
.....your operations
}catch(AdviceException e){ //do nothing in here }
0
 
LVL 17

Author Comment

by:sweetfa2
ID: 22631707
Thanks, I was looking for a way to do it that is generic without wrapping each of my operations.  I have created a wrapper class at the moment that does all that but it means that I can't use the <aop: options to configure anything as the afterReturning etc methods need to be wrapped with the error handling wrapper.
0
 
LVL 17

Author Closing Comment

by:sweetfa2
ID: 31501823
Wasn't really what I wanted but simplistically is a workable solution, and you did bother to respond, so you get the points.
0

Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Java string replace 11 77
jmeter usage 4 63
Regarding swagger API 1 60
JVM error from eclipse 1 26
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question