2 Replies Latest reply: Mar 2, 2011 2:50 PM by aksarben RSS

    Exception Handling


      I am creating a web service for which I need a framework for Exception Handling which I can use in my future projects as well. Please provide ideas or a sample structure.

      Many thanks!
        • 1. Re: Exception Handling
          One idea is that I doubt that is viable.

          Attempting a one size fits all solution to exception handling is unlikely to work.

          Now if there is a specific small problem domain to be addressed that might be doable.
          • 2. Re: Exception Handling
            Some general thoughts: Consider whether it makes sense to set up error categories (i.e., base classes) for (1) warnings (2) transient errors (ones that might go away on a retry) or (3) fatal errors (ones you're pretty sure will require human intervention). My personal philosophy is that it makes sense to declare different exception types only if I handle them differently, or if the error types themselves give information about the cause or location of the problem.