How to suppress stacktraces from Rule-Connect-Java exceptions?
We have a Rule-Connect-Java which returns throws an exception for config issues. For various reasons of design, this could be thrown 1000's of times in a non-prod system.
This is an example where we'd like the caller to decide whether or not to dump the stacktrace.
There's two ways I can see of suppressing this:
- Override activity Rule-Connector-Java.Invoke and change oLog(msg, cause)
- Update our log4j appender to use the pattern
%throwable{short}
Neither of these is ideal, especially the second, which would impact in many places.
There oughtta be a parameter on the Rule-Connect-Java call -- or the ruleform as well -- for the programmer to decide whether to suppress the logs or not.
***Updated by moderator: Marissa to close post***
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
That would be nice. But what kind of exceptions are you referring to? Are they really "Exceptions" or you are using exceptions as part of control flows? (which should be avoided). Currently, Rule-Connector-Java.Invoke captures ActivityTerminationException, PRAppRuntimeException and PRRuntimeException and rethrow them.