title: Spring where to throw exception
body: <p>I am working on a new Spring MVC based application.
  I have multiple flows where the controller will make request to business manager and further business manager will talk to DAO layer to retrieve data.</p>
  
  <p>There can be possible cases where I don't get data back from the DAO.
  I want to understand what is best way to deal with this situation.</p>
  
  <p>1) When ever there is no data retrieved for a query then Throw back Custom Exception like 'Content Not Found' from DAO layer to Business Layer and then to Controller and let controller decide what to do.</p>
  
  <p>2) Return blank/null Pojo object back to business manager and let manager throw the exception to Controller.</p>
  
  <p>3) Controller receives null/blank from Manager and decides what to do with that.</p>
  
  <p>I am finding 1st approach better as when the exception is thrown i have complete stack trace to understand where exactly the problem occurred but on downside I will end up cluttering my code with Exception in the signatures.</p>
  
  <p>Number 3 will leave the code clean but I wont be able to pin point where exactly the data retrieval failed as there can be multiple calls to DAO from Business Layer.</p>