javauis/m2g_qt/javasrc/org/w3c/dom/DOMException.java
changeset 80 d6dafc5d983f
parent 56 abc41079b313
equal deleted inserted replaced
78:71ad690e91f5 80:d6dafc5d983f
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 package org.w3c.dom;
       
    19 
       
    20 /**
       
    21  *
       
    22  */
       
    23 public class DOMException extends RuntimeException
       
    24 {
       
    25 
       
    26     /**
       
    27      * If a node is used in a different document than the one that created it
       
    28      * (that doesn't support it).
       
    29      */
       
    30     public static final short WRONG_DOCUMENT_ERR          = 4;
       
    31 
       
    32     /**
       
    33      * If index or size is negative, or greater than the allowed value.
       
    34      */
       
    35     public static final short INDEX_SIZE_ERR = 1;
       
    36 
       
    37     /**
       
    38      * If any Node is inserted somewhere it doesn't belong.
       
    39      */
       
    40     public static final short HIERARCHY_REQUEST_ERR = 3;
       
    41 
       
    42     /**
       
    43      * If an attempt is made to modify an object where modifications are not allowed.
       
    44      */
       
    45     public static final short NO_MODIFICATION_ALLOWED_ERR = 7;
       
    46 
       
    47     /**
       
    48      * If an attempt is made to reference a {@link org.w3c.dom.Node Node} in a context where it does not exist. See {@link org.w3c.dom.Node#insertBefore insertBefore} for example.
       
    49      */
       
    50     public static final short NOT_FOUND_ERR = 8;
       
    51 
       
    52     /**
       
    53      * If the implementation does not support the requested type of object or operation.
       
    54      */
       
    55     public static final short NOT_SUPPORTED_ERR = 9;
       
    56 
       
    57     /**
       
    58      * If an attempt is made to use an object that is not, or is no longer, usable.
       
    59      */
       
    60     public static final short INVALID_STATE_ERR = 11;
       
    61 
       
    62     /**
       
    63      * If an attempt is made to modify the type of the underlying object.
       
    64      */
       
    65     public static final short INVALID_MODIFICATION_ERR = 13;
       
    66 
       
    67     /**
       
    68      * If a parameter or an operation is not supported by the underlying object.
       
    69      */
       
    70     public static final short INVALID_ACCESS_ERR = 15;
       
    71 
       
    72     /**
       
    73      * If the type of an object is incompatible with the expected type of the parameter associated to the object.
       
    74      */
       
    75     public static final short TYPE_MISMATCH_ERR = 17;
       
    76 
       
    77     /**
       
    78      *
       
    79      * The member variable to store exception's code, like INVALID_ACCESS_ERR.
       
    80      */
       
    81     public short code;
       
    82 
       
    83     /**
       
    84      * Constructs a DOMException with a detailed message.
       
    85      *
       
    86      * @param code the exception's error code.
       
    87      * @param message the exception's descriptive message.
       
    88      */
       
    89     public DOMException(final short code,
       
    90                         final String message)
       
    91     {
       
    92         super(message);
       
    93         this.code = code;
       
    94     }
       
    95 
       
    96 
       
    97 }