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

  • Home
  • SEARCH
  • 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 776231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T19:24:57+00:00 2026-05-14T19:24:57+00:00

I recently migrated a VB6 app to VB.Net. Entire VB6 dependency are removed .

  • 0

I recently migrated a VB6 app to VB.Net. Entire VB6 dependency are removed . And the code was working fine just for a single module mean to say like for WinApp it is working fine.

Now my requirement has been changed, now the same class will be accessed by multiple application , it might a Windows App, Web App or a web service. So I am not able decide any efficient error handling pattern.

So you you guys help me out. Currently what I am doing is that parent function , i am passing two vars LogError as bool and ErrorMessage as string parameter, that will further check something like this

Catch(ex as Exception)
     If LogError then
          MessageBox.Show("My_Module_Name :" & ex.Message)
     EndIf
     ErrorMessage = ex.Message
End Try

Also same catch block is used in all other functions/ subroutines.
So what I need is any elegant handling method that will work efficiently on cross-app platform(win/web/service)

  • 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-14T19:24:57+00:00Added an answer on May 14, 2026 at 7:24 pm

    I’d suggest logging the messages, either to a log file or to the Event log, but why not let the clients choose, in that you could add some methods to let the client decide where it should be logged. Though instead of having your exception handler handle the message and put it into an errormessage variable I’d just follow the logging with a throw so that the Exception continued up in the call chain until some code that knew how to handle it got it.

    In general it’s not good practice to catch Exception, you should catch only the exceptions that you can handle. But I think it’s ok if you just want to log it and then will re-throw it again.

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

Sidebar

Related Questions

I recently migrated a website to a new CMS (Umbraco). A lot of the
We have recently migrated a large, high demand web application to Tomcat 5.5 from
Recently I have been investigating the possibilities of caching in ASP.NET. I rolled my
Recently, I've been dealing with an error with accessing MAPI via the .NET framework
I recently migrated a database from sql server 2005 to 2008 on windows server
I recently migrated an older application we have at work from Java 1.5 to
I recently migrated my web services from Axis to CXF (2.1). It appears that
I recently migrated a VSS database to TFS 2008. Using Source Control Explorer, I
We recently migrated from coldfusion 7 to coldfusion 8. One of our reporting flex
I recently migrated my Qt project from Linux to Vista, and now I'm debugging

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.