title: Java best practices when throwing exceptions: throwing core Java exceptions
body: <p>Instead of throwing <code>new Exception("Some message", maybeSomeCause)</code>, which means that all callers of my method will need to catch Exception (which can include RuntimeExceptions), I'd like to throw a more specific type of exception when a problem occurs.</p>
  
  <p>I can create my own exception types which extend Exception or another exception type, but I am curious if it is a good idea to re-use some exceptions that come with core Java language, such as:</p>
  
  <ul>
  <li>IllegalArgumentException</li>
  <li>UnsupportedOperationException</li>
  <li>IOException</li>
  <li>Others?</li>
  </ul>
  
  <p>Are there others that I am missing?  I found a basic list of the 'core' exceptions here: <a href="http://rymden.nu/exceptions.html" rel="noreferrer">http://rymden.nu/exceptions.html</a>, with humous explanations.</p>
  
  <p>Thanks!</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Is there a good list of 'core' exceptions?</p>
  
  <p><strong>List so far:</strong></p>
  
  <ul>
  <li><a href="http://rymden.nu/exceptions.html" rel="noreferrer">http://rymden.nu/exceptions.html</a></li>
  <li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html" rel="noreferrer">Java 7 Exception class API</a></li>
  </ul>