Error Handling in ASP.NET
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngdebug' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Joshua D. Little
-- Moved from [aspngfreeforall] to [aspngdebug] by Charles M. Carroll <Click here to reveal e-mail address> --Do errors "bubble" up through the call stack in .NET? I'm somewhat new to "real" programming (only ASP and Basic before), so the whole error handling thing is unfamiliar to me.For example, if I create a function in a DLL that I access from a web project, if I use Try <call to DLL> Catch e as exception End Try, will I be able to catch any errors that happen inside of the DLL function?Thanks.--Ambrose
Reply to this message...
 
    
Steven A Smith (VIP)
Yep, that's how it works. Of course, if the DLL is doing its own error handling
it might not throw exceptions (depends on how it is written), but assuming
that's not the case, you're right on about the process.

Steve

----- Original Message -----
From: "Joshua D. Little" <Click here to reveal e-mail address>
To: "aspngdebug" <Click here to reveal e-mail address>
Sent: Friday, January 25, 2002 3:22 PM
Subject: [aspngdebug] Error Handling in ASP.NET

> -- Moved from [aspngfreeforall] to [aspngdebug] by Charles M. Carroll
<Click here to reveal e-mail address> --
[Original message clipped]

Reply to this message...
 
    
Saurabh Nandu (VIP)
Yes, Exceptions certainly bubble-up, if they have not already been
caught!
If your Dll functions handle their exception's the exception will not
bubble-up, but if there is any un-handled exception in the Dll functions
they will bubble-up to the caller application... and if still its not
caught, the user will be presented with an appropriate error message and
the application might terminate!

Regards,
Saurabh Nandu
www.MasterCSharp.com
Master C#, the easy way...

[Original message clipped]

Reply to this message...
 
    
J. Ambrose Little
Could I catch an error in my DLL and within the catch statement throw a
custom exception?

-----Original Message-----
From: Saurabh Nandu [mailto:Click here to reveal e-mail address]
Sent: Saturday, 26 January, 2002 10.22
To: aspngdebug
Subject: [aspngdebug] RE: Error Handling in ASP.NET

Yes, Exceptions certainly bubble-up, if they have not already been
caught! If your Dll functions handle their exception's the exception
will not bubble-up, but if there is any un-handled exception in the Dll
functions they will bubble-up to the caller application... and if still
its not caught, the user will be presented with an appropriate error
message and the application might terminate!

Regards,
Saurabh Nandu
www.MasterCSharp.com
Master C#, the easy way...

[Original message clipped]

| [aspngdebug] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngreuse.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

Reply to this message...
 
    
Steven A Smith (VIP)
Certainly, in fact this is often done.

Steve

----- Original Message -----
From: "J. Ambrose Little" <Click here to reveal e-mail address>
To: "aspngdebug" <Click here to reveal e-mail address>
Sent: Saturday, January 26, 2002 2:10 PM
Subject: [aspngdebug] RE: Error Handling in ASP.NET

[Original message clipped]

Reply to this message...
 
 




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com