Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ public default CompletableFuture<BindingSet> answerAsync(AnswerKnowledgeInteract
BindingSet bs = this.answer(anAKI, anAnswerExchangeInfo);
future.complete(bs);
} catch (Exception e) {
LoggerFactory.getLogger(AnswerHandler.class).error("{}", e);
LoggerFactory.getLogger(AnswerHandler.class)
.error("Answering should not result in the following exception.", e);
future.completeExceptionally(e);
}
return future;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ public default CompletableFuture<BindingSet> reactAsync(ReactKnowledgeInteractio
BindingSet bs = this.react(anRKI, aReactExchangeInfo);
future.complete(bs);
} catch (Exception e) {
LoggerFactory.getLogger(ReactHandler.class).error("{}", e);
LoggerFactory.getLogger(ReactHandler.class)
.error("Reacting should not result in the following exception.", e);
future.completeExceptionally(e);

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ public void unregister(ReactKnowledgeInteraction anReactKI) {
private void tryPut(MyKnowledgeInteractionInfo kii) throws IllegalArgumentException {
var existing = this.kiis.putIfAbsent(kii.id, kii);
if (existing != null) {
throw new IllegalArgumentException("A Knowledge Interaction with that URI was already registered.");
throw new IllegalArgumentException(
"The Knowledge Interaction with URI '" + kii.getId() + "' should not be already registered.");
}
}

Expand Down Expand Up @@ -243,7 +244,7 @@ private URI generateId(KnowledgeInteraction aKI, boolean isMeta) {
return new URI(this.getKnowledgeBaseId().toString() + "/interaction/" + aKI.getName());
} else {
return new URI(this.knowledgeBase.getKnowledgeBaseId().toString() + "/interaction/"
+ UUID.randomUUID().toString());
+ UUID.randomUUID().toString());
}
}
} catch (URISyntaxException e) {
Expand Down