Im and Re
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
package org.solovyev.android.calculator;
|
||||
|
||||
import jscl.CustomFunctionCalculationException;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.solovyev.common.JBuilder;
|
||||
@@ -66,7 +67,11 @@ public abstract class AbstractCalculatorMathRegistry<T extends MathEntity, P ext
|
||||
if (persistenceContainer != null) {
|
||||
for (P entity : persistenceContainer.getEntities()) {
|
||||
if (!contains(entity.getName())) {
|
||||
add(createBuilder(entity));
|
||||
try {
|
||||
add(createBuilder(entity));
|
||||
} catch (CustomFunctionCalculationException e) {
|
||||
CalculatorLocatorImpl.getInstance().getLogger().error(null, e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -13,4 +13,7 @@ public interface CalculatorLogger {
|
||||
void debug(@Nullable String tag, @NotNull String message);
|
||||
|
||||
void debug(@Nullable String tag, @NotNull String message, @NotNull Throwable e);
|
||||
|
||||
void error(@Nullable String tag, @NotNull String message, @NotNull Throwable e);
|
||||
|
||||
}
|
||||
|
@@ -28,4 +28,10 @@ public class SystemOutCalculatorLogger implements CalculatorLogger {
|
||||
debug(tag, message);
|
||||
e.printStackTrace(System.out);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void error(@Nullable String tag, @NotNull String message, @NotNull Throwable e) {
|
||||
System.out.println(getTag(tag) + ": " + message);
|
||||
e.printStackTrace(System.out);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user