Skip to content

Commit

Permalink
[Fix apache#3677] Removing exception type from error message
Browse files Browse the repository at this point in the history
  • Loading branch information
fjtirado committed Sep 23, 2024
1 parent 0fbddf3 commit f8de3b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1163,8 +1163,7 @@ public void setErrorState(NodeInstance nodeInstanceInError, Exception e) {
this.nodeIdInError = nodeInstanceInError.getNodeDefinitionId();
this.nodeInstanceIdInError = nodeInstanceInError.getId();
this.errorCause = Optional.of(e);
Throwable rootException = getRootException(e);
this.errorMessage = rootException.getClass().getCanonicalName() + " - " + rootException.getMessage();
this.errorMessage = getRootException(e).getMessage();
setState(STATE_ERROR);
logger.error("Unexpected error while executing node {} in process instance {}", nodeInstanceInError.getNode().getName(), this.getStringId(), e);
((InternalProcessRuntime) getKnowledgeRuntime().getProcessRuntime()).getProcessEventSupport().fireOnError(this, nodeInstanceInError, getKnowledgeRuntime(), e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void execute(KogitoProcessContext context) throws Exception {
}
}
} else {
setError(context, expr.toString());
setError(context, "The expression used for generating error message is not a valid one: " + expr.asString());
}
}

Expand Down

0 comments on commit f8de3b8

Please sign in to comment.