KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > org > apache > xml > internal > utils > synthetic > SynthesisException


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 /*
17  * $Id: SynthesisException.java,v 1.6 2004/02/17 04:23:24 minchau Exp $
18  */

19 package com.sun.org.apache.xml.internal.utils.synthetic;
20
21 /**
22  * Class SynthesisException <needs-comment/>
23  * @xsl.usage internal
24  */

25 public class SynthesisException extends Exception JavaDoc
26 {
27
28   /** Field code.
29    * @serial */

30   int code;
31
32   // Manefest constants
33

34   /** Field SYNTAX */
35   public static final int SYNTAX = 0;
36
37   /** Field UNSUPPORTED */
38   public static final int UNSUPPORTED = 1;
39
40   /** Field REIFIED */
41   public static final int REIFIED = 2;
42
43   /** Field UNREIFIED */
44   public static final int UNREIFIED = 3;
45
46   /** Field WRONG_OWNER */
47   public static final int WRONG_OWNER = 4;
48
49   /** Field errToString */
50   public static final String JavaDoc[] errToString = {
51     "(Syntax error; specific message should be passed in)",
52     "Feature not yet supported",
53     "Can't change features of 'real' class",
54     "Can't yet instantiate/invoke without 'real' class",
55     "Can't add Member to an object other than its declarer", };
56
57   /**
58    * Constructor SynthesisException
59    *
60    *
61    * @param code
62    */

63   public SynthesisException(int code)
64   {
65
66     super(errToString[code]);
67
68     this.code = code;
69   }
70
71   /**
72    * Constructor SynthesisException
73    *
74    *
75    * @param code
76    * @param msg
77    */

78   public SynthesisException(int code, String JavaDoc msg)
79   {
80
81     super(msg);
82
83     this.code = code;
84   }
85
86   /**
87    * Method getCode
88    *
89    *
90    */

91   int getCode()
92   {
93     return code;
94   }
95 }
96
Popular Tags