All it takes is one vote. Make it yours. Login and vote now.
By dlinsin
via dlinsin.blogspot.com
Published: Apr 20 2008 / 21:28
By dlinsin
via dlinsin.blogspot.com
Published: Apr 20 2008 / 21:28
Comments
trevor replied ago:
I like the idea of enumerating the specific problems in the more generic Exception class, but I don't think the Exception itself is the proper place to be doing user messages/localization. It is pushing view layer concerns into the control layer.
It would seem to be more maintainable if the Swing/MVC Action classes/etc. simply looked up in ResourceBundles the display strings based on the exception's type they caught.
David Linsin replied ago:
Hi trevor,
thx for your feedback. I totally agree that in terms of layering and responsibility you shouldn't handle view layer concerns in any other layer than the presentation tier. On the other hand you might wanna produce a language specific log file or send an internationalized Email through some back-end service. Don't you think a generic Exception class handling this concern would be a clean designed solution?
Writing this almost seems like this problem is a cross-cutting-concern...
Voters For This Link (11)
Voters Against This Link (1)