View Javadoc

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  
24  
25  package sl;
26  
27  /***
28    This exception is thrown when some inconsistency is detected during some
29    ontological operation.
30  
31    @author Giovanni Rimassa - Universita` di Parma
32    @version $Date: 2003/10/09 13:00:37 $ $Revision: 1.1.1.1 $
33  */
34  public class OntologyException extends Exception {
35  
36    /***
37    @serial
38    */
39    private Throwable nested;
40  
41    /***
42      Create a new exception object.
43      @param msg The message for this exception object.
44    */
45    public OntologyException(String msg) {
46      super(msg);
47    }
48  
49    /***
50      Create a new exception object.
51      @param msg The message for this exception object.
52      @param t The exception wrapped by this object.
53    */
54    public OntologyException(String msg, Throwable t) {
55      super(msg);
56      nested = t;
57    }
58  
59      public void printStackTrace() {
60        if (nested != null)
61  	nested.printStackTrace();
62        super.printStackTrace();
63      }
64  }
65