title: How to fail a Gatling test from within "exec"?
body: <p>A Gatling scenario with an exec chain. After a request, returned data is saved. Later it's processed and depending on the processing result, it should either fail or pass the test.</p>
  
  <p>This seems like the simplest possible scenario, yet I can't find any reliable info how to fail a test from within an exec block. <em>assert</em> breaks the scenario and seemingly Gatling (as in: the exception throw doesn't just fail the test).</p>
  
  <p>Example:</p>
  
  <pre><code>// The scenario consists of a single test with two exec creating the execChain
  val scn = scenario("MyAwesomeScenario").exec(reportableTest(
  
       // Send the request
       exec(http("127.0.0.1/Request").get(requestUrl).check(status.is(200)).check(bodyString.saveAs("MyData")
  
       // Process the data
      .exec(session =&gt; { 
           assert(processData(session.attributes("MyData")) == true, "Invalid data");
      })
  ))
  </code></pre>
  
  <p>Above the scenario somewhere along the line "guardian failed, shutting down system".</p>
  
  <p>Now this seems a useful, often-used thing to do - I'm possibly missing something simple. How to do it?</p>