Class ScriptingErrorUtils
java.lang.Object
com.flowable.platform.engine.impl.scripting.ScriptingErrorUtils
- Author:
- Filip Hrisafov
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidthrowBusinessError(String errorCode) Throws an engine-neutral business error, caught by BPMN error boundary events and CMMN fault sentries with a matching error code.voidthrowBusinessError(String errorCode, String message) Throws an engine-neutral business error with an additional message.voidthrowForbidden(String message) Throws a forbidden exception with the given message.voidthrowIllegalArgument(String message) Throws an illegal argument exception with the given message.voidthrowNotFound(String message) Throws a not found exception with the given message.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
ScriptingErrorUtils
public ScriptingErrorUtils()
-
-
Method Details
-
throwForbidden
Throws a forbidden exception with the given message. This will be mapped to a 403 HTTP status code.- Parameters:
message- the message to display
-
throwIllegalArgument
Throws an illegal argument exception with the given message. This will be mapped to a 400 HTTP status code.- Parameters:
message- the message to display
-
throwNotFound
Throws a not found exception with the given message. This will be mapped to a 404 HTTP status code.- Parameters:
message- the message to display
-
throwBusinessError
Throws an engine-neutral business error, caught by BPMN error boundary events and CMMN fault sentries with a matching error code. Prefer this overflw.bpmn.throwErrorwhen the script may run in either BPMN or CMMN contexts.- Parameters:
errorCode- the error code used to match boundary events / fault sentries.
-
throwBusinessError
-