How fail scenario after catch exception

Gatling version: 3.11.5 (must be up to date)
Gatling flavor: java kotlin scala javascript typescript
Gatling build tool: maven gradle sbt bundle npm

I read the guidelines and how to ask a question topics.
I provided a SSCCE (or at least, all information to help the community understand my topic)
I copied output I observe, and explain what I think should be.

Hello Team, I’m trying to fail my scenario, I found that when throw exception during exec in the html report the scenario failed with KO status and simulation keeps executing the next scenario, is there any way to stop the simulation after scenario failed.
second I tried to catch the exception but the status of scenario is OK now and I lost the advantage of showing exception message in the html report is there any way to catch the exception and make the scenario failed with status KO and show the exception error message in the report and in the end should simulation stoped in that scenario.
FYI : I’m using my service SDK instead of http protocol
Thank you

Hi,

Gatling version : 3.11.5 (must be up to date)

This is not up-to-date. Latest version is 3.13.1.

I have the feeling you’re misusing different terms, in particular scenario.
A scenario is a workflow, composed of actions, that virtual users perform.

keeps executing the next scenario

Do you really mean scenario here?

Yeah, I’m using the latest version 3.13.1 sorry for that.
Let’s say we have 2 scenarios, if the logic of the first one throw an exception, in the html report it’s KO status with exception message but it keep running the second scenario I don’t want that case it should maybe stop the simulation or continue if it’s other case like cleaning resources.

but it keep running the second scenario

Are you using andThen?

it should maybe stop the simulation

You can maybe use stopLoadGenerator but it will stop everything and not execute the next andThen scenario.

I’m afraid we don’t support what you’re looking for.

Yes, I’m using andThen, what about change the value of status (OK and KO) can we do that and in case of throwing exception I see that exception message in the html report can we combine set in manually KO status and show that message when catching exception ? I’m not sure if it’s possible :smile:

I’m okay with keep throwing the exception to get KO status, but I will lost the session of that scenario so I can’t use it in the next scenario