ErrorHandling

From SPA Wiki

Jump to: navigation, search

Contents

Notes from Error Handling BOF Session

SPA2006 Charles Weir 28/03/2006


Literature
Raising and Handling Errors
  • User vs.. techie as target for reporting - front end vs. back end stakeholders.
  • Blue screen sometimes better than wrong - or 24x7 would be different.
  • Exceptions vs. Error codes - which gives better discipline?
  • About state-based vs. stack-based.
  • “Error” = change to state. Java/C%2b%2b exception only because stack-based paradigm.
  • Classification of errors: Business vs. Technical, User vs. System vs. bug.
  • Exception al condition vs. expected error
  • 3 parts: Detect, Report, Handle. Need to Know what is your strategy is.
  • Handling - repair or ignore.
  • DB Transactions
  • Recovery vs.. logging
Error Handling Mechanisms
  • Terminate on bug?
  • Global error handler concept
  • Inherit from “RuntimeException” - no need to declare.
  • Strongly vs. weekly enforced exceptions
  • Exception that deals with itself? Tricky because no context.
  • Double dispatch exceptions?
  • Factory for exceptions passed into function?
  • Set up error handlers with context, then invoke (UNIX signal handler paradigm).
Error Strategy
  • Exception handling is just a mechanism for separation of concerns
  • Error transfer between components and systems?
  • E.H. Strategy. (An example: http://www.octopull.demon.co.uk/java/ExceptionalJava.html)
  • E.H. is modular.
  • Errors part of the contract - but “unexpected” errors.
  • Error perspective for systems
  • Third party/other systems Error Handling policy out of our control
  • Quality of Service influences
  • What data goes with to allow handling (context)?
  • Attributes of errors (“retry-able”, ... )
Teaching Error Handling
  • Java Libraries = bad examples
  • Error handling by callback function.
  • Don’t like to think about errors (not sexy
  • Study and compare 2 applications?

---

Next steps:
  1. Use Wiki as basis for discussion...
  2. Study 2 example applications.
  3. Produce examples of ‘Error Handling Strategy’.

---

  http://today.java.net/pub/a/today/2006/04/06/exception-handling-antipatterns.html

--- CW: Someone (I assume Peter Sommerlad) posted "Wiki for further discussion: http://wiki.hsr.ch/DesignSense "

I suggest, though, as there's nothing currently there we continue discussion here and create new pages if required.

---

More comments here...