1 /******************************************************************
2 JADE - Java Agent DEvelopment Framework is a framework to develop
3 multi-agent systems in compliance with the FIPA specifications.
4 Copyright (C) 2000 CSELT S.p.A.
5
6 GNU Lesser General Public License
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation,
11 version 2.1 of the License.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the
20 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA.
22 *****************************************************************/
23 package sl/package-summary.html">g> sl;
24
25 /***
26 This exception is thrown when some problem occurs in the concrete parsing
27 subsystem accessed through this interface. If an exception is thrown by the
28 underlying parser, it is wrapped with a <code>Codec.CodecException</code>,
29 which is then rethrown.
30 */
31 public class CodecException extends Exception {
32 /***
33 @serial
34 */
35 private Throwable nested;
36
37 /***
38 Construct a new <code>CodecException</code>
39 @param msg The message for this exception.
40 @param t The exception wrapped by this object.
41 */
42 public CodecException(String msg, Throwable t) {
43 super(msg);
44 nested = t;
45 }
46
47 /***
48 Reads the exception wrapped by this object.
49 @return the <code>Throwable</code> object that is the exception thrown by
50 the concrete parsing subsystem.
51 */
52 public Throwable getNested() {
53 return nested;
54 }
55
56 public void printStackTrace() {
57 if (nested != null)
58 nested.printStackTrace();
59 super.printStackTrace();
60 }
61 }