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 8098461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:05:10+00:00 2026-06-05T22:05:10+00:00

I have this consumer targeted application that has built in error reporting. Sometimes I

  • 0

I have this consumer targeted application that has built in error reporting.
Sometimes I get error reports for exceptions like the remote name could not be resolved
on host names like google.com for example.
Which obviously is not a problem in my application, but rather on the users end.

How can I, in my application, categorize certain Exceptions and instead of offer sending an error report, show a dialog suggesting the user to check certain things on his/her end.
Also taking into account the fact that users have localized .NET framework installations. (Error messages in their language)

EDIT: It’s really not a question about separating SQLException from WebException, it’s more how I can determine a WebException of type remote name could not be resolved from WebException The operation has timed-out for example.

  • 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-06-05T22:05:11+00:00Added an answer on June 5, 2026 at 10:05 pm

    You want to use try/catch statement with multiple catch blocks:

    try { ... connect... }
    catch(SocketException ex) { 
      switch(ex.ErrorCode)
      {
        case 123: ....
        default: ....
      }
    }
    catch(WebException ex) { 
      if(ex.InnerException is SocketException)
      {
        switch(((SocketException)ex.InnerException).ErrorCode)
        {
          case 123: ....
          default: ....
        }
      }
      switch(ex.Status)
      {
        case 500: ....
        default: ....
      }
    }
    ....
    catch(Exception ex) { .... something unforeseen, send error report .... }
    

    Basically, each one of those exception should contain additional information in properties that you can check without relying on string comparisons.

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

Sidebar

Related Questions

We have this software that has a webservices component. Now, the administrator of this
I have a dataset whose columns look like this: Consumer ID | Product ID
I have to write this produce consumer application using multithreading. I wrote the following
WHy am I get this error : java.lang.IllegalArgumentException: This consumer expects requests of type
I have an insert query like this: INSERT INTO CONSUMER (CONS_ID_NO, LOCATION_ID, AREA_CODE, CONS_NO,
I have this jsp client that consumes a webservice. The problem with the client
We have a application which is triggered from browser. This application consumes around 800
I have this error message: Msg 8134, Level 16, State 1, Line 1 Divide
I have this DependencyProperty which holds an entity with a property that is a
I have a consumer table which has the columns - Email, AccountState and DateCreated

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.