title: Exception handling strategy in Data Access Layer
body: <p>I am building a Data Access Layer which is going to be used in two types of applications.</p>
  <ol>
  <li><p>Applications that do not care about the specifics of the error. If an exception occurs then most probably is going to just get logged and the user may not be aware of it.</p>
  <p>Example: Simple barcode stock taking application. The user inputs the barcode and if a connection is available to the database, then the system provides some extra info, if not then only the barcode is recorded locally. In this case I do not want detail exception handling.</p>
  </li>
  <li><p>Applications where I care a lot about the details of the exception.</p>
  </li>
  </ol>
  <p>What strategy do I have to follow when building my DAL in order to accommodate both categories?</p>
  <p>Right now I am building an application from the first category and all I have done in my DAL methods is to just let the exception bubble up to the presentation layer, where I have several <code>try..catch</code> blocks in order to make the simple handling of logging, letting the user be unaware of he error.</p>