Gatling2: Exception text during the test


In my test i have users with different accounts, each type of account has id.

During the test I check this id to understand if current user can operate with this type of account.

Now I want create a scenario, where all users will randomly do all operation.

My request looks:

val request_payment = foreach("${acc_ids}", “acc_id”){

doIf(session => session(“acc_id”) == “10”) {

exec(http(“Local Payment”)



.queryParam(""“accid”"", “”“10"”")


I would like to make the check to throw the exception with more readable message like “user isn’t authorized for this kind of operation”.

Is it possible in Gatling2?

Thank You in advance

No, sorry, one can’t “override” a check message.

The thing is that there might be other bad things happening during check than the mere expected vs actual comparison, such as evaluating the expected from session data (this data could be missing, who knows). So a check could end up producing different messages, there’s not one signe possibility.