Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

12345678910111213141516171819202122
  1. import java.sql.SQLException;
  2. public aspect Softener {
  3. // expect this to soften the exception thrown
  4. declare soft: Throwable : execution(* *.run());
  5. }
  6. class SoftenInner {
  7. public static void main(String args[]) {
  8. new SoftenInner().foo();
  9. }
  10. public void foo() {
  11. new Runnable() {
  12. public void run() {
  13. throw new SQLException("test");
  14. }
  15. }.run();
  16. }
  17. }