title: Catching an exception when loading a groovy file
body: <p>I have these 3 groovy files:</p>
  
  <p>A.groovy:</p>
  
  <pre><code>// ...
  stage("Test")
  {
      throw new Exception("This script fails")
  }
  </code></pre>
  
  <p>B.groovy:</p>
  
  <pre><code>// ...
  stage("Test")
  {
      // Nothing, want this to pass
  }
  </code></pre>
  
  <p>main.groovy:</p>
  
  <pre><code>// ...
  m = [:]
  status = [:]
  scripts = ["A", "B"]
  for script in scripts
  {
      m["${script}"] = 
      {
          stage("${script}")
          {
              try
              {
                   load "${script}.groovy"
                   status["${script}"] = true
              }
              catch (Exception e)
              {
                   status["${script}"] = false   
              }
          }
      }
  }
  
  parallel m
  
  for result_iterator in status:
      print "${result_iterator.key} resulted in ${result_iterator.value}"
  </code></pre>
  
  <p>The code above is a sketch of the real code =)
  When I run main.groovy to see the results in the status dictionary, I only get to see B. A threw an exception and thus it didn't add itself to the dictionary. Is there a way I can catch A's exception somehow?</p>