01: /* Copyright (c) 2001 - 2007 TOPP - www.openplans.org. All rights reserved.
02: * This code is licensed under the GPL 2.0 license, availible at the root
03: * application directory.
04: */
05: package org.vfny.geoserver.wms;
06:
07: import org.vfny.geoserver.ExceptionHandler;
08: import org.vfny.geoserver.ServiceException;
09:
10: /**
11: * ServiceConfig exception handler for WMS services
12: *
13: * @author Gabriel Rold?n
14: * @version $Id: WmsExceptionHandler.java 6326 2007-03-15 18:36:40Z jdeolive $
15: */
16: public class WmsExceptionHandler implements ExceptionHandler {
17: /** DOCUMENT ME! */
18: private static final WmsExceptionHandler instance = new WmsExceptionHandler();
19: private WmsException lnkWmsException;
20:
21: private WmsExceptionHandler() {
22: }
23:
24: /**
25: * DOCUMENT ME!
26: *
27: * @return DOCUMENT ME!
28: */
29: public static final WmsExceptionHandler getInstance() {
30: return instance;
31: }
32:
33: /**
34: * DOCUMENT ME!
35: *
36: * @param message DOCUMENT ME!
37: *
38: * @return DOCUMENT ME!
39: */
40: public ServiceException newServiceException(String message) {
41: return new WmsException(message);
42: }
43:
44: /**
45: * DOCUMENT ME!
46: *
47: * @param message DOCUMENT ME!
48: * @param locator DOCUMENT ME!
49: *
50: * @return DOCUMENT ME!
51: */
52: public ServiceException newServiceException(String message,
53: String locator) {
54: return new WmsException(message, locator);
55: }
56:
57: /**
58: * DOCUMENT ME!
59: *
60: * @param e DOCUMENT ME!
61: *
62: * @return DOCUMENT ME!
63: */
64: public ServiceException newServiceException(Throwable e) {
65: return new WmsException(e);
66: }
67:
68: /**
69: * DOCUMENT ME!
70: *
71: * @param e DOCUMENT ME!
72: * @param preMessage DOCUMENT ME!
73: * @param locator DOCUMENT ME!
74: *
75: * @return DOCUMENT ME!
76: */
77: public ServiceException newServiceException(Throwable e,
78: String preMessage, String locator) {
79: return new WmsException(e, preMessage, locator);
80: }
81: }
|