There’s this piece of code I keep on using, I thought I could share it here. The idea is to keep the displaying of error messages separate from their generation.
The error router is a singleton that can be used to separate error generation from error display. Code generating an error can call ErrorRouter.getInstance().notifyError(errorData)
A visual object responsible for displaying error messages can implement IErrorDisplay and call ErrorRouter.getInstance().registerErrorDisplay(this)
If no error display is registered, a simple trace is used.
I’d post the code if posting code in wordpress wasn’t such a pain. You can download it though
by parker
14 Apr 2011 at 16:56
404 on the code link?
by parker
14 Apr 2011 at 20:08
Working now. : )
by admin
14 Apr 2011 at 20:51
thanks for pointing it out