File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
opengrok-indexer/src/main/java/org/opengrok/indexer/web/messages Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 28
28
import com .fasterxml .jackson .databind .SerializerProvider ;
29
29
import com .fasterxml .jackson .databind .annotation .JsonSerialize ;
30
30
import com .fasterxml .jackson .databind .ser .std .StdSerializer ;
31
+ import org .opengrok .indexer .logger .LoggerFactory ;
32
+
31
33
import javax .validation .constraints .NotBlank ;
32
34
33
35
import java .io .IOException ;
45
47
import java .util .TimerTask ;
46
48
import java .util .TreeSet ;
47
49
import java .util .function .Predicate ;
50
+ import java .util .logging .Level ;
51
+ import java .util .logging .Logger ;
48
52
import java .util .stream .Collectors ;
49
53
50
54
public class MessagesContainer {
51
55
56
+ private static final Logger LOGGER = LoggerFactory .getLogger (MessagesContainer .class );
57
+
52
58
public static final String MESSAGES_MAIN_PAGE_TAG = "main" ;
53
59
54
60
private static final int DEFAULT_MESSAGE_LIMIT = 100 ;
@@ -121,7 +127,9 @@ public void addMessage(final Message m) {
121
127
}
122
128
123
129
if (isMessageLimitExceeded ()) {
124
- return ;
130
+ LOGGER .log (Level .WARNING , "cannot add message to the system, " +
131
+ "exceeded Configuration messageLimit of {0}" , messageLimit );
132
+ throw new IllegalStateException ("Cannot add message - message limit exceeded" );
125
133
}
126
134
127
135
if (expirationTimer == null ) {
You can’t perform that action at this time.
0 commit comments