01: /*
02: * CoadunationLib: The coaduntion implementation library.
03: * Copyright (C) 2006 Rift IT Contracting
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation; either
08: * version 2.1 of the License, or (at your option) any later version.
09: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: *
15: * You should have received a copy of the GNU Lesser General Public
16: * License along with this library; if not, write to the Free Software
17: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18: *
19: * WebServiceException.java
20: *
21: * The web service exception thrown when there is an error working with the
22: * web services.
23: */
24:
25: // package path
26: package com.rift.coad.lib.webservice;
27:
28: // imports
29: import com.rift.coad.lib.httpd.MimeTypes;
30:
31: /**
32: * The web service exception thrown when there is an error working with the web
33: * services.
34: *
35: * @author Brett Chaldecott
36: */
37: public class WebServiceException extends java.lang.Exception {
38:
39: private String encoding = MimeTypes.PLAIN;
40:
41: /**
42: * Creates a new instance of <code>WebServiceException</code> without detail message.
43: *
44: * @param msg the detail message.
45: */
46: public WebServiceException(String msg) {
47: super (msg);
48: }
49:
50: /**
51: * Creates a new instance of <code>WebServiceException</code> without detail message.
52: *
53: * @param msg the detail message.
54: * @param encoding The encoding of the string
55: */
56: public WebServiceException(String msg, String encoding) {
57: super (msg);
58: this .encoding = encoding;
59: }
60:
61: /**
62: * Constructs an instance of <code>WebServiceException</code> with the specified detail message.
63: *
64: * @param msg the detail message.
65: * @param ex The exception stack trace.
66: */
67: public WebServiceException(String msg, Throwable ex) {
68: super (msg, ex);
69: }
70:
71: /**
72: * Constructs an instance of <code>WebServiceException</code> with the specified detail message.
73: *
74: * @param msg the detail message.
75: * @param encoding The encoding of the string
76: * @param ex The exception stack trace.
77: */
78: public WebServiceException(String msg, String encoding, Throwable ex) {
79: super (msg, ex);
80: this .encoding = encoding;
81: }
82:
83: /**
84: * This method returns the encoding of the message.
85: *
86: * @return Encoding of the string message.
87: */
88: public String getEncoding() {
89: return encoding;
90: }
91: }
|