KeywordUtil.markFailed and -markFailedAndStop throws exception


I have seen these errors other Katalon users for a long time.
Is there coming any fix for this bug?
If using KeywordUtil.markFailed(“Your error message”) and/or KeywordUtil.markFailedAndStop(“Your error message”) Katalon throws
And no matter if using “import com.kms.katalon.core.util.KeywordUtil” or/and(together) “import com.kms.katalon.core.util.KeywordUtil as KeywordUtil”.

Example if I use command KeywordUtil.markFailed(“Your error message”) Katalon throws:
com.kms.katalon.core.exception.StepFailedException: Your error message
at com.kms.katalon.core.util.KeywordUtil.markFailed(
at com.kms.katalon.core.util.KeywordUtil$markFailed$ Source)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(
at com.kms.katalon.core.main.TestCaseExecutor.runScript(
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(
at com.kms.katalon.core.main.TestCaseExecutor.execute(
at com.kms.katalon.core.main.TestCaseMain.runTestCase(
at com.kms.katalon.core.main.TestCaseMain.runTestCase(
at com.kms.katalon.core.main.TestCaseMain$runTestCase$ Source)

Real solution is not “…don’t use KeywordUtil.markFailed use instead of it KeywordUtil.markWarning -command.”
If I use KeywordUtil.markWarning(“Your error message”), it works.

I have:
Katalon Studio
Version: 6.3.3
Build: 11

Thank you.


probably I don’t understand, but what is the issue here?

this is how step failed is working. any step failure will throw an exception. so … where is the bug here? between the chair and keyboard?

“any step failure will throw an exception” ->
In the log, it looks as if the script is defective, that is, it is foolish and causes misunderstanding of the login reader.
So this is waste of time.
Thanks anyway.

yes, it is a waste of time … for both parties, you and the rest of us who spend time for reading the docs of various languages and tools in the attempt to understand how do they works and how to properly use them.
thank you!

i never meet any test framework up to now where a failed assertion won’t throw an exception. and i tried quite few. but who knows … i may need to learn more …

To be fair, you are marking something as “Failed”, inherently that is an exception.
You can add text to the failure to indicate what happened. But in reality there is a failure and the script wasn’t able to continue. It’s not showing the script is defective.

and … if you want the script to continue, read about failure handling.
buuut … i am just a poor guy wasting his time reading the docs, what do i know?
for the ‘real coders’ such behaviour is just a bug …


You may prefer KeywordLogger class to KeywordUtil.

KeywordLogger just logs a message without stack trace.


You can read the source of KeywordUtil class here:

I found KeywordUtil.markWarning(String) and Keywordutil.logInfo(String) are also available. These just calls KeywordLogger without throwing Exception.

1 Like

To answer the original question posted and for future readers

import com.kms.katalon.core.util.KeywordUtil


catch(Exception e) {


This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.