Set ERROR status for ModularADAPChromatogramBuilderTask when there are no matching scans
@@ -149,6 +149,13 @@ public class ModularADAPChromatogramBuilderTask extends AbstractTask {
logger.info(() -> "Started chromatogram builder on " + dataFile);
scans = scanSelection.getMatchingScans(dataFile);
+ if (scans.length == 0) {
+ setStatus(TaskStatus.ERROR);
+ setErrorMessage("There are no scans satisfying filtering values. Consider updating filters "
+ + "with \"Set filters\" in the \"Scans\" parameter.");
+ return;
+ }
+
List<Float> rtListForChromCDF = new ArrayList<>();
// Check if the scans are properly ordered by RT
