System Exception

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Todd Bright (ToddBright_at_discussions.microsoft.com)
Date: 02/16/05


Date: Wed, 16 Feb 2005 11:17:03 -0800

Is there a way to get to the last exception in .Net from outside a catch
block? I've inherited someone else's ASP.Net app that's having problems. He
is calling a method to log his errors but is only passing his custom error
messages so there is no way to know what is really happening. What I would
like to do is to access the last exception that occurred from the LogError()
function rather than have to modify all of the places that it is being called
to pass extra information to it.

Is there anything in .Net that provides access to the last exception data...
Message, StackTrace, etc?

Thanks,
Todd



Relevant Pages

  • Re: Accessing SessionState in Application_Error
    ... I am trying to create a custom error page, ... unable to pass the exception from the global.asax file to the page via ... Dim ctx As HttpContext = HttpContext.Current ... it means that you either don't have a session or have a new ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: ???
    ... can do this to add information to the probably already excisting exception. ... Take the ArgumentException ... > i am a bit confused on the way custom error are handling and occurs. ... > Does this will remove custom error from my end users or only from Local web ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Client found response content type of text/html; charset=Wind
    ... The Full HTML I get back is as ... to be viewable on remote machines, please create a tag within ... current error page you are seeing can be replaced by a custom error page by ... Exception Details: System.InvalidOperationException: Client found response ...
    (microsoft.public.dotnet.framework.webservices)
  • RE: ASP.NET Exception Handling
    ... HttpContext, that makes the custom error page fail to get the unhandled ... handler to hook the unhandled exception and use Server.Transfer to forward ... This posting is provided "AS IS" with no warranties, and confers no rights. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Preventing HTML Errors from web service
    ... create a custom error pagefor your webservice vdir. ... instead it is called by another thick client C# ... > If my web service throws an exception, the exception is caught by the ...
    (microsoft.public.dotnet.framework.aspnet)