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 ec7e927 commit ca13f7d
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 ca13f7d

Please sign in to comment.