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