Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 696365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:03:21+00:00 2026-05-14T03:03:21+00:00

I am using the exception catching procedure which is the module to track the

  • 0

I am using the exception catching procedure which is the module to track the errors and it write the error description in a log file in the server.I want to display the error details in a common Error page which is having a multi-line textbox from the common function in the module.Is it possible to do that.If possible,How can I do that….

Try

;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;

Catch ex as exception

CreateLogFile(Ex)

End Try

The above description is the error catching portion from the code

In the module I have written the CreateLogFile function which write the log file.

I want to display the Error Page after writing the log file which should contain the error details….

Please Help…?.alt text http://file:///C:/Documents%20and%20Settings/Ramesh.DEV/Desktop/bbbb.bmp

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T03:03:22+00:00Added an answer on May 14, 2026 at 3:03 am

    I haven’t tested all of this, but you could try re-throwing the exception.

    Catch ex as exception
        CreateLogFile(Ex)
        Throw
    End Try
    

    Then, to handle that, add a new “Global Application Class” to your solution. Visual Studio should then create a new file, Global.asax. In its code behind, do something like:

    Public Class Global
        Inherits System.Web.HttpApplication
        Protected Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
            Server.Transfer("~/Error.aspx")
        End Sub
    End Class
    

    The benefit of that is it will catch any uncaught exceptions. So then, once in Error.aspx, or whatever:

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
        Dim ex As Exception = Server.GetLastError()
        If ex Is Nothing Then
            'Can't determine last error
        Else
            ex = ex.GetBaseException()
            
            If ex Is Nothing Then
                'Can't determine last error
            Else
                'Display error message
            End If
        End If
    End Sub
    

    ^ For some reason the syntax highlighting javascript is taking those comments as strings.

    IMPORTANT NOTE: If, in any of your previous questions, you received an answer that helped you, maybe consider going back and clicking the green check mark next to that answer. It’ll make people more likely to provide answers to your future questions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get security exception when using System.Net.WebClient to do HTTP requests, which is due
I have heard that using exception trapping is not a recommended practice for number
The following bit of code catches the EOS Exception using (var reader = new
Example int *ptr; *ptr = 1000; can I catch memory access violation exception using
Does the using catch the exception or throw it? i.e. using (StreamReader rdr =
At what point would you create your own exception class vs. using java.lang.Exception? (All
Using java, minus the exception handling, it is as simple as FileOutputStream ostream =
Using something like this: try: # Something... except Exception as excep: logger = logging.getLogger(component)
I received the following exception when I was using the Regex class with the
I'm using watermark extenders on textboxes and an exception is being thrown from the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.