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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:46:33+00:00 2026-05-27T12:46:33+00:00

I am researching about the Exception handling application block and I read a paragraph

  • 0

I am researching about the Exception handling application block and I read a paragraph from the Microsoft page: When Should I Use the Exception Handling Application Block?

The original content:

Limitations of the Exception Handling Application Block

The Exception Handling Application Block is a complement to exception
handling recovery code
; it is not a replacement for it. If exceptions
occur because of truly unusual circumstances, it can be impossible for
an application to recover gracefully and finish the unit of work it
has started. However, it is sometimes possible to recover. An example
is an exception that occurs because a file is locked. The recovery
code might direct the application to retry the file after waiting for
some period of time.

In such cases, exception handling recovery code should be implemented
within the application code; it should not be implemented as a handler
used by the Exception Handling Application Block. This is because it
requires access to local variables, parameters, and other contextual
data. This data is out of scope and inaccessible to handlers run by
the Exception Handling Application Block.

What does “exception handling recovery code” mean?
An example would be useful too.

  • 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-27T12:46:34+00:00Added an answer on May 27, 2026 at 12:46 pm

    Exception handling recovery code would be what’s in your catch code block. It could be something that logs the error, looks up a friendly message to display to the user, or retries some process etc.

    From that quoted text in your question:

    An example is an exception that occurs because a file is locked. The recovery code might direct the application to retry the file after waiting for some period of time

    See on MSDN: Exceptions and Exception Handling.

    class ExceptionTest
    {
        static double SafeDivision(double x, double y)
        {
            if (y == 0)
                throw new System.DivideByZeroException();
            return x / y;
        }
        static void Main()
        {
            // Input for test purposes. Change the values to see
            // exception handling behavior.
            double a = 98, b = 0;
            double result = 0;
    
            try
            {
                result = SafeDivision(a, b);
                Console.WriteLine("{0} divided by {1} = {2}", a, b, result);
            }
            catch (DivideByZeroException e)
            {
                Console.WriteLine("Attempted divide by zero.");
            }
        }
    }
    

    An example of why you should handle exceptions as soon as possible, rather than in the exception handling application block, as it says, could be where you need access to local variables. E.g. you try and open a file, but get an error. It might be nice to let the user know which file you couldn’t open. For that you need access to the variables within the method that opens the file. If you wanted to retry opening the file you’d have to do that there too.

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

Sidebar

Related Questions

I've been researching about building desktop application with JavaFX framework. Does anyone have any
I've been researching about Flex and it seems that it's possible to use JavaScript
I was thinking to start researching about OO-DBMS performance for Java applications to use
I've tried researching about this for many days. I've really really no idea how
i've been researching this for about 3 hours now with no gravy so I
I've been researching about adding Arabic localisation into our software. I understand that mirroring
I'm quite new to Android development and was about to finish my first application
I have been researching about the headless browsers available till to date and found
I was researching about multi-tenancy and multi-instance approaches and chose a hybrid. I keep
http://apps1.eere.energy.gov/buildings/energyplus/ I am researching about this software at the moment and I am wondering

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.