You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ErroneousExceptionConversion1.java 570B

1234567891011121314151617181920212223242526
  1. import org.aspectj.lang.*;
  2. import org.aspectj.testing.Tester;
  3. aspect Watchcall {
  4. pointcut myConstructor(): execution(new(..));
  5. before(): myConstructor() {
  6. System.err.println("Entering Constructor");
  7. }
  8. after(): myConstructor() {
  9. System.err.println("Leaving Constructor");
  10. }
  11. }
  12. public class ErroneousExceptionConversion1 {
  13. public static void main(String[] args) {
  14. try {
  15. ErroneousExceptionConversion1 c = new ErroneousExceptionConversion1();
  16. Tester.checkFailed("shouldn't get here");
  17. } catch (NoAspectBoundException nab) {
  18. // expected
  19. }
  20. }
  21. }