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.

PR79554.java 683B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Created on 22.10.2004
  3. */
  4. /**
  5. * @author Thomas Knauth
  6. */
  7. public class PR79554
  8. {
  9. public static void main(String[] args)
  10. {
  11. try
  12. {
  13. if ( args.length < 0 )
  14. {
  15. System.out.println("Usage!");
  16. return;
  17. }
  18. throw new Exception();
  19. }
  20. catch ( Throwable e )
  21. {
  22. System.out.println( "exception caught!" );
  23. //e.printStackTrace();
  24. }
  25. finally
  26. {
  27. System.out.println("finally block entered!");
  28. }
  29. }
  30. }
  31. aspect Aspect {
  32. pointcut main(): execution(void main(String[]));
  33. after(): main(){
  34. System.out.println("Aspect calling after main!");
  35. }
  36. }