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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:26:28+00:00 2026-05-11T22:26:28+00:00

I have to implement a IExceptionHandler for the Enteprise Library 4.1. In my particular

  • 0

I have to implement a IExceptionHandler for the Enteprise Library 4.1. In my particular case I want to use it to log the exception to Fogbugz but the inner details is not what I am asking about. What I need is how to – best practicies – implement it, How to get the config for a app.config or web.config. etc.

I have code This so far:

   public class LcpFogbugzExceptionHandler : IExceptionHandler {
   /// <summary>
   /// Initializes a new instance of the <see cref="LcpFogbugzExceptionHandler"/> class.
   /// </summary>
   public LcpFogbugzExceptionHandler() {
        // <param name="ignore">The ignore.</param>
        //NameValueCollection ignore
    }

    /// <summary>
    /// Initializes a new instance of the <see cref="T:LcpFogbugzExceptionHandler"/> class.
    /// </summary>
    /// <param name="ignore">The ignore.</param>
   public LcpFogbugzExceptionHandler(NameValueCollection ignore) {
   }

    /// <summary>
    /// Handles the exception.
    /// </summary>
    /// <param name="exception">The exception.</param>
    /// <param name="handlingInstanceId">The handling instance id.</param>
    /// <returns></returns>
   [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1300:SpecifyMessageBoxOptions"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.Convert.ToBoolean(System.String)")]
    public Exception HandleException(Exception exception, Guid handlingInstanceId) {
        // Perform processing here. The exception returned will be passed to the next
        // exception handler in the chain. 

        return exception;
    }

}
  • 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-11T22:26:28+00:00Added an answer on May 11, 2026 at 10:26 pm

    I’m not sure what you mean by best practices – you have the code skeleton correct so just fill it with your implementation. Random points that might be useful:

    You can read config settings in the normal way (ConfigurationManager etc). Your handler is running in the same process and thread that called ExceptionPolicy.HandleException in the first place.

    It would be a good idea to make the handler code thread-safe, in case you have to handle exceptions in multiple threads (and if you don’t in this project, you might need to in the next one).

    If you want to pass any non-static instance data into the handler from the calling code, you could populate the Data dictionary of the exception being handled, which will be preserved intact through the whole handler chain and out to the calling code again. I have used this technique to send data into a handler, get data back out of a handler, and allow one handler to control the actions of the next one in the chain. If you do this, make sure that all Data values are serializable.

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

Sidebar

Related Questions

I have to implement a one linked list but it should put object in
I have to implement simple ray tracing algorithm, but I can not figure out
I have implement paypal library for payment in my iphone project. How can I
In My app i have implement the ListView . Now i want it to
I have implement game application in which i want to play mid sound file
I want to play the video as splash screen.I have implement the play video
I have implement the ValueChanged event, but I found it will be triggered only
I have implement dining philosophers problem in java but something goes wrong and it
I have to implement a digital envelope using AES and RSA, but I am
I have implement a scrollview with paging but it not work ok. For every

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.