Commit 18793c04 authored by Luna Riegel's avatar Luna Riegel
Browse files

Style: Add error log for checks

parent ee6980a0
...@@ -672,7 +672,9 @@ public class Checker { ...@@ -672,7 +672,9 @@ public class Checker {
if (!missedFeatures.isEmpty()){ if (!missedFeatures.isEmpty()){
//TODO: Localize String //TODO: Localize String
logger.error("Checker still unable to load some CityObjects from database!"); logger.error("Checker still unable to load some CityObjects from database!");
logger.debug(missedFeatures.toString()); if (logger.isDebugEnabled()){
logger.debug(missedFeatures.toString());
}
} }
} }
long endTime = System.nanoTime(); long endTime = System.nanoTime();
...@@ -693,7 +695,8 @@ public class Checker { ...@@ -693,7 +695,8 @@ public class Checker {
} }
} catch (InterruptedException e) { } catch (InterruptedException e) {
throw new RuntimeException(e); Thread.currentThread().interrupt();
logger.error("Main Thread got interrupted during ThreadPool shutdown");
} }
} }
} }
...@@ -726,11 +729,13 @@ public class Checker { ...@@ -726,11 +729,13 @@ public class Checker {
return null; return null;
}); });
} }
logger.trace("Queueing up finished, invoking all tasks");
return exec.invokeAll(tasks); return exec.invokeAll(tasks);
} }
private List<GmlId> getMissedFeatures(List<Future<GmlId>> futures) throws InterruptedException{ private List<GmlId> getMissedFeatures(List<Future<GmlId>> futures) throws InterruptedException{
List<GmlId> missedList = new ArrayList<>(); List<GmlId> missedList = new ArrayList<>();
Set<ExecutionException> errors = new HashSet<>();
for (Future<GmlId> future : futures) { for (Future<GmlId> future : futures) {
try{ try{
GmlId gmlId = future.get(); GmlId gmlId = future.get();
...@@ -740,8 +745,13 @@ public class Checker { ...@@ -740,8 +745,13 @@ public class Checker {
} catch (ExecutionException e){ } catch (ExecutionException e){
logger.debug("A Task failed due to an unexpected exception", e); logger.debug("A Task failed due to an unexpected exception", e);
logger.debug(e.getCause()); logger.debug(e.getCause());
errors.add(e);
} }
} }
if (!errors.isEmpty()) {
logger.error("Encountered check failures due to the following errors:");
logger.error(errors.toString());
}
return missedList; return missedList;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment