KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xerces > xs > XSException


1 /*
2  * Copyright 2003,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 package org.apache.xerces.xs;
18
19 /**
20  * The XML Schema API operations only raise exceptions in "exceptional"
21  * circumstances, i.e., when an operation is impossible to perform (either
22  * for logical reasons, because data is lost, or because the implementation
23  * has become unstable).
24  * <p>Implementations should raise other exceptions under other circumstances.
25  * <p>Some languages and object systems do not support the concept of
26  * exceptions. For such systems, error conditions may be indicated using
27  * native error reporting mechanisms. For some bindings, for example,
28  * methods may return error codes similar to those listed in the
29  * corresponding method descriptions.
30  */

31 public class XSException extends RuntimeException JavaDoc {
32
33     /** Serialization version. */
34     static final long serialVersionUID = 3111893084677917742L;
35     
36     public XSException(short code, String JavaDoc message) {
37        super(message);
38        this.code = code;
39     }
40     public short code;
41     // ExceptionCode
42
/**
43      * If the implementation does not support the requested type of object or
44      * operation.
45      */

46     public static final short NOT_SUPPORTED_ERR = 1;
47     /**
48      * If index or size is negative, or greater than the allowed value
49      */

50     public static final short INDEX_SIZE_ERR = 2;
51
52 }
53
Popular Tags