Is there a specific way to stop the test/simulation in case condition failure?

In reply to trymybest:

what do you mean by error message in test?