title: How do I raise an error from if activity in ADFV2?
body: <p>I have a child pipeline that receives instructions from a control file using a dataset.  These instructions define what directory to copy files from.  </p>
  
  <p>First this child pipeline checks that a file exists via Get Metadata activity on the source folder.  It then executes a child pipeline to process the data if one or more childitems are returned from GetMetaData.</p>
  
  <p>In the control dataset, there is also a required Y/N field meaning I can ignore the error if the folder or file does not exist.  </p>
  
  <p>If the folder does not exist, the GetMEtadata will fail.  If it exists but no files, I get 0 child items.  So 2 different things happen for file or folder missing (an error or 0 items).</p>
  
  <p>In either case, I need to route the output of GetMetaData to an IF that checks if the file was required.  If not, consume the error and return.  If it was required, raise an error.</p>
  
  <p>I can't find a way to raise an error though.  Just as important, is there an alternative approach that would work or fit better with ADF V2 design?</p>
  
  <p>Many thanks,
  Mark.</p>