1 /*
   2  * reserved comment block
   3  * DO NOT REMOVE OR ALTER!
   4  */
   5 /*
   6  * Licensed to the Apache Software Foundation (ASF) under one or more
   7  * contributor license agreements.  See the NOTICE file distributed with
   8  * this work for additional information regarding copyright ownership.
   9  * The ASF licenses this file to You under the Apache License, Version 2.0
  10  * (the "License"); you may not use this file except in compliance with
  11  * the License.  You may obtain a copy of the License at
  12  *
  13  *      http://www.apache.org/licenses/LICENSE-2.0
  14  *
  15  * Unless required by applicable law or agreed to in writing, software
  16  * distributed under the License is distributed on an "AS IS" BASIS,
  17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18  * See the License for the specific language governing permissions and
  19  * limitations under the License.
  20  */
  21 
  22 package com.sun.org.apache.xerces.internal.xni.parser;
  23 
  24 import com.sun.org.apache.xerces.internal.util.Status;
  25 import com.sun.org.apache.xerces.internal.xni.XNIException;
  26 
  27 /**
  28  * An XNI parser configuration exception. This exception class extends
  29  * <code>XNIException</code> in order to differentiate between general
  30  * parsing errors and configuration errors.
  31  *
  32  * @author Andy Clark, IBM
  33  *
  34  * @version $Id: XMLConfigurationException.java,v 1.7 2010-11-01 04:40:22 joehw Exp $
  35  */
  36 public class XMLConfigurationException
  37     extends XNIException {
  38 
  39     /** Serialization version. */
  40     static final long serialVersionUID = -5437427404547669188L;
  41 
  42     //
  43     // Data
  44     //
  45 
  46     /** Exception type. */
  47     protected Status fType;
  48 
  49     /** Identifier. */
  50     protected String fIdentifier;
  51 
  52     //
  53     // Constructors
  54     //
  55 
  56     /**
  57      * Constructs a configuration exception with the specified type
  58      * and feature/property identifier.
  59      *
  60      * @param type       The type of the exception.
  61      * @param identifier The feature or property identifier.
  62      */
  63     public XMLConfigurationException(Status type, String identifier) {
  64         super(identifier);
  65         fType = type;
  66         fIdentifier = identifier;
  67     } // <init>(short,String)
  68 
  69     /**
  70      * Constructs a configuration exception with the specified type,
  71      * feature/property identifier, and error message
  72      *
  73      * @param type       The type of the exception.
  74      * @param identifier The feature or property identifier.
  75      * @param message    The error message.
  76      */
  77     public XMLConfigurationException(Status type, String identifier,
  78                                      String message) {
  79         super(message);
  80         fType = type;
  81         fIdentifier = identifier;
  82     } // <init>(short,String,String)
  83 
  84     //
  85     // Public methods
  86     //
  87 
  88     /**
  89      * Returns the exception type.
  90      */
  91     public Status getType() {
  92         return fType;
  93     } // getType():short
  94 
  95     /** Returns the feature or property identifier. */
  96     public String getIdentifier() {
  97         return fIdentifier;
  98     } // getIdentifier():String
  99 
 100 } // class XMLConfigurationException