title: When to catch the exceptions (high level vs. low level)?
body: <p>I have created the following classes:</p>
  
  <ul>
  <li>Abstract logger class</li>
  <li>Three subclasses of the abstract logger class which implement actual loggers</li>
  <li>Class which acts as an interface to the logger</li>
  </ul>
  
  <p>The three subclasses can throw exceptions (creating file, writing to file etc.).</p>
  
  <p>Should I catch the exceptions directly in the three subclasses or rethrow it there and catch it in the interface? Or perhaps catching in a class which uses the logger interface?</p>
  
  <p>Second, I have a class which parses a settings file. I have made it with the singleton pattern (only one instance at runtime). Of course in this class exceptions can occur (NullPointerException and IOException).</p>
  
  <p>Should I catch these exceptions directly in this class or rethrow it to a client of that class?</p>
  
  <p>My general problem is that I don't know when I have to catch the exceptions and when to rethrow it.</p>