From: Matthew B. <mat...@co...> - 2005-06-21 19:33:26
|
At the moment whenever an exception gets thrown from a method in BuildingSession (or subclass) the calling code (normally a facility) logs the exception. The problem is that some of these errors are just users doing silly things and don't need to be logged. One example of this is when a user tries to remove a section from a logbook that contains questions a BuildingServerException is thrown from the LogBookSessionImpl.deleteSection() method. Now the LogBookSession.deleteSection() method may throw a BuildingServerException for a much more serious error as well (not being able to fing the logbook associated with the session). To allow us to still log the serious errors but ignore (but still display to the user) the others I create a new exception BuildingServerUserException that subclasses BuildingServerException and then a special catch clause can be added in places where it is needed. As an example attached is the patch that shows the changes to LogBookSessionImpl. Comments? -- +--Matthew Buckett-----------------------------------------+ | VLE Developer, Learning Technologies Group | | Tel: +44 (0) 1865 283660 http://www.oucs.ox.ac.uk/ | +------------Computing Services, University of Oxford------+ |