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.internal.commands;
10:
11: import net.refractions.udig.project.command.Command;
12: import net.refractions.udig.project.command.ErrorHandler;
13: import net.refractions.udig.project.command.UndoableCommand;
14: import net.refractions.udig.project.internal.ProjectPlugin;
15:
16: /**
17: * A basic ErrorHandler. It simple logs the exception API is this public?
18: *
19: * @author jeichar
20: * @since 0.2
21: * @see ErrorHandler
22: */
23: public class DefaultErrorHandler implements ErrorHandler {
24:
25: /**
26: * @see net.refractions.udig.project.internal.command.ErrorHandler#handleError(net.refractions.udig.project.internal.command.MapCommand,
27: * Throwable)
28: */
29: public void handleError(Command command, Throwable e) {
30: ProjectPlugin.log("", e); //$NON-NLS-1$
31: }
32:
33: /**
34: * @see net.refractions.udig.project.internal.command.ErrorHandler#handleRollbackError(net.refractions.udig.project.internal.command.UndoableCommand,
35: * Throwable)
36: */
37: public void handleRollbackError(UndoableCommand command, Throwable e) {
38: e.printStackTrace();
39: }
40:
41: }
|