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 2828import com .fasterxml .jackson .databind .SerializerProvider ;
2929import com .fasterxml .jackson .databind .annotation .JsonSerialize ;
3030import com .fasterxml .jackson .databind .ser .std .StdSerializer ;
31+ import org .opengrok .indexer .logger .LoggerFactory ;
32+
3133import javax .validation .constraints .NotBlank ;
3234
3335import java .io .IOException ;
4547import java .util .TimerTask ;
4648import java .util .TreeSet ;
4749import java .util .function .Predicate ;
50+ import java .util .logging .Level ;
51+ import java .util .logging .Logger ;
4852import java .util .stream .Collectors ;
4953
5054public class MessagesContainer {
5155
56+ private static final Logger LOGGER = LoggerFactory .getLogger (MessagesContainer .class );
57+
5258 public static final String MESSAGES_MAIN_PAGE_TAG = "main" ;
5359
5460 private static final int DEFAULT_MESSAGE_LIMIT = 100 ;
@@ -121,7 +127,9 @@ public void addMessage(final Message m) {
121127 }
122128
123129 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" );
125133 }
126134
127135 if (expirationTimer == null ) {
You can’t perform that action at this time.
0 commit comments