title: Stop batch script from executing while encountering error
body: <p>So I'm building multiple client using the same batch script. If there's an error while building one, that process simply stops and continues with the next one. Because there's a lot of output on the screen and I'm doing other things, most of the time I miss that there was a build error.</p>
  
  <p>Is there a way to stop executing the following tasks if there's an error, and show a popup message to get my attention? Or at least stop executing so when I come back to the command window I can see that there was a failure?</p>
  
  <pre><code>@echo off
  
  if "%1"=="?" GOTO HELP
  
  if NOT "%1"=="" set rev=%1
  if NOT "%2"=="" set version=%2
  
  @echo on
  rem build one 
  call perl buildClient.pl -brandName="myBrand" -group="group1" 
  
  rem build two 
  call perl buildClient.pl -brandName="myBrand" -group="group2" 
  
  rem build three
  call perl buildClient.pl -brandName="myBrand" -group="group3" 
  
  rem build four 
  call perl buildClient.pl -brandName="myBrand" -group="group4" 
  
  
      @echo off
  
      goto EXIT
  
      :HELP
      cls
      echo.
      echo.
      echo usage: buildbrand.bat [revision] [version] [group]
      echo.
      echo        ?           = this help screen
      echo.
      echo        revision    = build version
      echo                      Example: 5.2.31
      echo        group       = group of phones or phone name
      echo                      Example: SonyEricsson\K750
      echo.
      :EXIT
      set version=
      set rev=
      set brandName=
      PAUSE
  </code></pre>