Exception Handling


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Exception Handling

  1. #1
    Join Date
    Mar 2009
    Posts
    1

    Exception Handling

    HI,

    my asp.net project has 3 tier (UI, BLL, DAL) architecture. can any body tell me the best way to handle the exception.

    will appreciate your help

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    It depends on what kind of exception it is. If it's something the user can do something about, such as invalid input, then re-throw the exception in the BLL and/or DAL and catch in the UI and display a message to the user. If the user cannot correct the problem, then catch it in the Application_Error event and write detailed information to a log to help you debug it. Then decide whether the application can continue silently, or whether you must tell the user that something went wrong.
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    gmani Guest
    you can do this in your DLL functions..

    eg.,


    internal DataSet fun(BLL objBL)
    {
    try
    {
    //your connection, procedures here...
    }
    catch(Exception ex)
    {
    ex.Message(); // can display this message in your page by converting this as session object
    }
    finally
    {

    }
    return ds;

    }


    hope this may help for u.....


    Cheers..

Similar Threads

  1. C++ exception Handling
    By Peter_APIIT in forum C++
    Replies: 17
    Last Post: 06-14-2007, 12:19 AM
  2. exception handling bulk collect
    By josie cayetano in forum Database
    Replies: 1
    Last Post: 09-17-2002, 11:01 PM
  3. Exception Handling...
    By KracKHed in forum .NET
    Replies: 3
    Last Post: 07-19-2002, 05:52 PM
  4. Exception Handling in Exception Handlers
    By David Williams in forum .NET
    Replies: 1
    Last Post: 05-28-2002, 03:19 PM
  5. Exception Handling
    By Jonathan Wood in forum .NET
    Replies: 10
    Last Post: 02-04-2001, 09:36 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center