Error Handling Design Patterns
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have
Exception Handling Patterns C#
Meta Discuss the workings and policies of this site About Us Learn exception handling framework design in java more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us
Software Error Handling Best Practice
Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like error handling best practices you, helping each other. Join them; it only takes a minute: Sign up Design patterns: exception / error handling up vote 25 down vote favorite 19 Is there any resource (web or book) describing exception handling / error handling design patterns? There is a lot of literature on how to write clean code, and there are what design pattern database connection uses a lot of books covering design patterns. I have, however, never seen any design pattern covering the issue of where and how best to handle errors and how best to propagate an error appearing in a low-level function up the levels of abstraction. design-patterns exception-handling share|improve this question asked Mar 21 '13 at 8:31 JohnB 6,75411645 add a comment| 3 Answers 3 active oldest votes up vote 30 down vote accepted These patterns and best practices are often bound to a specific platform/language, so they are the first place to look for them. Exception patterns wiki is a general patterns resource. As an example check the following links for java: Best Practices for Exception Handling 15 Best practices about exception handling Exception-Handling Antipatterns Going through such materials would give you a general idea to follow in exception handling mechanisms. Also check other SO questions: Exception handling pattern Java Style: Properly handling exceptions share|improve this answer edited May 7 '14 at 12:02 xorrr 72 answered Mar 21 '13 a
The remote host or network may be down. Please try the request again. Your cache administrator is webmaster. Generated Tue, 11 Oct 2016 16:11:15 GMT by s_wx1127 (squid/3.5.20)
your site: Error logging and patterns Overload Journal #34 - Oct 1999 + Design of applications and programs Author: Steve Cornish Back in Overload 32 Francis suggested that his lack of experience with https://accu.org/index.php/journals/512 larger systems made him ill-equipped to review design patterns. The implication, of cause, is that design patterns are for large systems. He then went on to throw down the gauntlet of a challenge to anyone, to explain some patterns. I didn't set out to pick up the gauntlet - in my head this article was sketched - but hopefully I can show Francis error handling where patterns are applicable on a small scale. This article sets out to look at error logging and present a solution that is scalable from small to large systems. In the process of tackling this problem several well-known patterns are used. Error handling is universal to small and large systems, and whatever mechanism you use to handle errors there is always a need error handling best to log errors. In my experience, error handling and logging is one of the key reasons why small solutions often don't scale upwards. In a 500-line program you can send error reports to standard error, or a message box where you please. In a 50,000-line program that is distributed across multiple machines and compiled from re-usable libraries something more substantial is required. The solution I present here is designed to scale from small systems to large systems. All the patterns referenced here are from Design Patterns by Gamma et al. Often referred to as Gang of Four patterns because the book was written by four people (who, of cause, are the Gang of Four - or GoF if you like TLAs). While not the first work on patterns it is the work which introduced the software community at large to them. The problem Three principal requirements are: The error log should be easily accessible and easy to use : developers should be encouraged to log early, log often. It should be possible to log to multiple destinations (sinks.) It should be possible to add and remove sin