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.

MessageHandler.java 705B

123456789101112131415161718192021222324252627282930
  1. import org.aspectj.bridge.AbortException;
  2. import org.aspectj.bridge.IMessage;
  3. import org.aspectj.bridge.IMessageHandler;
  4. import org.aspectj.bridge.IMessage.Kind;
  5. public class MessageHandler implements IMessageHandler {
  6. public boolean handleMessage(IMessage message) throws AbortException {
  7. System.out.println(message);
  8. if (message.getKind() == IMessage.ERROR) {
  9. System.exit(-1);
  10. }
  11. else if (message.getKind() == IMessage.ABORT) {
  12. throw new AbortException(message.toString());
  13. }
  14. return true;
  15. }
  16. public boolean isIgnoring(IMessage.Kind kind) {
  17. return false;
  18. }
  19. public void dontIgnore(IMessage.Kind kind) {
  20. }
  21. public void ignore(IMessage.Kind kind) {
  22. }
  23. }