2
* Licensed to the Apache Software Foundation (ASF) under one or more
3
* contributor license agreements. See the NOTICE file distributed with
4
* this work for additional information regarding copyright ownership.
5
* The ASF licenses this file to You under the Apache License, Version 2.0
6
* (the "License"); you may not use this file except in compliance with
7
* the License. You may obtain a copy of the License at
9
* http://www.apache.org/licenses/LICENSE-2.0
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
18
package org.apache.xerces.xni.parser;
20
import org.apache.xerces.xni.XNIException;
23
* An XNI parser configuration exception. This exception class extends
24
* <code>XNIException</code> in order to differentiate between general
25
* parsing errors and configuration errors.
27
* @author Andy Clark, IBM
29
* @version $Id: XMLConfigurationException.java,v 1.2 2009/12/10 03:18:08 matthewoliver Exp $
31
public class XMLConfigurationException
32
extends XNIException {
34
/** Serialization version. */
35
static final long serialVersionUID = -5437427404547669188L;
41
/** Exception type: identifier not recognized. */
42
public static final short NOT_RECOGNIZED = 0;
44
/** Exception type: identifier not supported. */
45
public static final short NOT_SUPPORTED = 1;
51
/** Exception type. */
52
protected short fType;
55
protected String fIdentifier;
62
* Constructs a configuration exception with the specified type
63
* and feature/property identifier.
65
* @param type The type of the exception.
66
* @param identifier The feature or property identifier.
68
* @see #NOT_RECOGNIZED
71
public XMLConfigurationException(short type, String identifier) {
74
fIdentifier = identifier;
75
} // <init>(short,String)
78
* Constructs a configuration exception with the specified type,
79
* feature/property identifier, and error message
81
* @param type The type of the exception.
82
* @param identifier The feature or property identifier.
83
* @param message The error message.
85
* @see #NOT_RECOGNIZED
88
public XMLConfigurationException(short type, String identifier,
92
fIdentifier = identifier;
93
} // <init>(short,String,String)
100
* Returns the exception type.
102
* @see #NOT_RECOGNIZED
103
* @see #NOT_SUPPORTED
105
public short getType() {
109
/** Returns the feature or property identifier. */
110
public String getIdentifier() {
112
} // getIdentifier():String
114
} // class XMLConfigurationException