Surround library crash with try-catch
This commit is contained in:
parent
4fe57fdfd1
commit
007f9fb51b
1 changed files with 5 additions and 1 deletions
|
@ -126,7 +126,11 @@ public abstract class AbstractPrologCommandPlayer implements CommandPlayer, Stat
|
|||
@Override
|
||||
public void stateChanged(ApplicationMode change) {
|
||||
if(prologSystem != null) {
|
||||
prologSystem.getTheoryManager().retract(new Struct("appMode", new Var()));
|
||||
try {
|
||||
prologSystem.getTheoryManager().retract(new Struct("appMode", new Var()));
|
||||
} catch (Exception e) {
|
||||
log.error("Retract error: ", e);
|
||||
}
|
||||
prologSystem.getTheoryManager()
|
||||
.assertA(
|
||||
new Struct("appMode", new Struct(ctx.getSettings().APPLICATION_MODE.get().getStringKey()
|
||||
|
|
Loading…
Reference in a new issue