title: which exception to throw if list is empty in java?
body: <p>I have the following doubt concerning which exception to throw if list is empty</p>
  
  <pre><code>public class XYZ implements Runnable {
      private List&lt;File&gt; contractFileList;
  
      @Override
      public void run() { 
          contractFileList = some method that will return the list;
          //now i want to check if returned contractFile is empty or not , if yes then raise the exception
          if (contractFileList.isEmpty()) {
              // throw new ?????
          }
      }
  }
  </code></pre>
  
  <p>I am runing this code inside a batch, I want  to throw some exception that will stop the batch execution.</p>