File tree Expand file tree Collapse file tree
src/main/java/nl/rug/jbi/jsm/core/execution Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99import nl .rug .jbi .jsm .core .event .EventBus ;
1010import org .apache .logging .log4j .LogManager ;
1111import org .apache .logging .log4j .Logger ;
12+ import org .apache .logging .log4j .message .ParameterizedMessage ;
1213
1314import java .util .List ;
1415import java .util .Map ;
@@ -69,11 +70,24 @@ public Class apply(final IsolatedMetric isolatedMetric) {
6970 for (final IsolatedMetric m : this .metricList ) {
7071 final MetricState state = isolatedMetricData .get (m .getClass ());
7172 if (state .isValid ()) {
72- results .add (m .getResult (this .dataStore .getIdentifier (), state ));
73+ try {
74+ results .add (m .getResult (this .dataStore .getIdentifier (), state ));
75+ continue ;
76+ } catch (final Exception ex ) {
77+ logger .warn (
78+ new ParameterizedMessage (
79+ "Exception occurred while finalizing '{}' for '{}'" ,
80+ m .getClass ().getName (),
81+ state .getIdentifier ()
82+ ),
83+ ex
84+ );
85+ }
7386 } else {
7487 logger .warn ("Failed to calculate '{}' for '{}'" , m .getClass ().getName (), state .getIdentifier ());
75- results .add (new InvalidResult (this .dataStore .getIdentifier (), m , "Error during calculation" ));
7688 }
89+
90+ results .add (new InvalidResult (this .dataStore .getIdentifier (), m , "Error during calculation" ));
7791 }
7892
7993 //Deliver Results
You can’t perform that action at this time.
0 commit comments