01: /*
02: * uDig - User Friendly Desktop Internet GIS client http://udig.refractions.net (C) 2004,
03: * Refractions Research Inc. This library is free software; you can redistribute it and/or modify it
04: * under the terms of the GNU Lesser General Public License as published by the Free Software
05: * Foundation; version 2.1 of the License. This library is distributed in the hope that it will be
06: * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
07: * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
08: */
09: package net.refractions.udig.project.command;
10:
11: /**
12: * MapCommand Managers have error handles registered that are notified when a command throws an
13: * exception. Error handlers know what to do with the exception.
14: * <p>
15: * An example is a Transaction Error handler which
16: *
17: * @author jeichar
18: * @since 0.3
19: */
20: public interface ErrorHandler {
21: /**
22: * Handles an error that occurs during the execution of a command.
23: *
24: * @param command The command which raised the excpetion.
25: * @param e the exception raised.
26: * @see MapCommand
27: * @see Throwable API allow this to throw an exception?
28: */
29: public void handleError(Command command, Throwable e);
30:
31: /**
32: * Handles an error that occurs during the rollback of a undoable command.
33: *
34: * @param command The command which raised the excpetion.
35: * @param e the exception raised.
36: * @see UndoableCommand
37: * @see Throwable API allow this to throw an exception?
38: */
39: public void handleRollbackError(UndoableCommand command, Throwable e);
40: }
|