title: Extending SQLException - errors from baseclass throw
body: <p>(getting back to Java after a long absence)</p>
  
  <p>In short: have existing code that throws <strong>SQLException</strong>. I want to trap these events. I've created a class that extends SQLException and tried updating the <strong>throws</strong> declaration of a function but am getting compile errors.</p>
  
  <blockquote>
    <p>java: unreported exception java.sql.SQLException; must be caught or declared to be thrown</p>
  </blockquote>
  
  <p>Is what I'm trying to do permitted? If not, is there a way to trap a predefined exception in a subclass?</p>