Best practice for Handling exception RRS feed

  • Question

  • User-1583338774 posted

    Hi all,

      I devide my website on 3 layers : 

      DAL(Data Access) - simple extract data from DB using LINQ

      BLL(Business Logic)  - 

      cache data and in try/catch block call function from DAL and throw it to UI :



    catch (Exception ex)

      //Log error

     throw ex


      UI (User Interface) - simple working without handling any exception,

    So if error occured in BLL i will be redirected to Error.aspx page with message that something wrong. 

    But i suppose that this approach is not very good.

    Has somebody another approach, how and where handle exceptions, or may be exists common patter where handle and how to inform user about errors ? Can anybody share bes practice. 

    Thursday, June 3, 2010 12:56 PM