diff --git a/src/main/java/com/conveyal/r5/analyst/error/TaskError.java b/src/main/java/com/conveyal/r5/analyst/error/TaskError.java index c49cf18e8..565cb00dd 100644 --- a/src/main/java/com/conveyal/r5/analyst/error/TaskError.java +++ b/src/main/java/com/conveyal/r5/analyst/error/TaskError.java @@ -30,21 +30,15 @@ public TaskError(Throwable throwable) { } /** - * This constructor is used for errors that occur while applying a scenario to a network. - * messages will generally be either the errors or warnings associated with the modification, which is why there is - * a separate argument; otherwise we wouldn't know whether errors or warnings were desired. + * This constructor is used for errors, warnings, or informational messages that occur + * while applying a scenario to a network. */ public TaskError(Modification modification, Collection messages) { this.modificationId = modification.comment; this.title = "while applying the modification entitled '" + modification.comment + "'."; checkArgument(messages.size() <= Modification.MAX_MESSAGES + 1); this.messages.addAll(messages); - } - - public TaskError(String modificationId, String title, String detail) { - this.modificationId = modificationId; - this.title = title; - this.messages.add(detail); + this.messages.sort(String::compareTo); } } diff --git a/src/main/java/com/conveyal/r5/analyst/scenario/Modification.java b/src/main/java/com/conveyal/r5/analyst/scenario/Modification.java index a9c533a6e..d896a66a8 100644 --- a/src/main/java/com/conveyal/r5/analyst/scenario/Modification.java +++ b/src/main/java/com/conveyal/r5/analyst/scenario/Modification.java @@ -39,7 +39,7 @@ public abstract class Modification implements Serializable { * The maximum number of error messages in each category (info/warning/error) to store in each modification. * This prevents bandwidth/latency/memory problems from sending enormous lists of errors back to the client. */ - public static final int MAX_MESSAGES = 5; + public static final int MAX_MESSAGES = 40; /** Free-text comment describing this modification instance and what it's intended to do or represent. */ public String comment;