org.omg.CORBA

Class ExceptionList


  • public abstract class ExceptionList
    extends Object
    An object used in Request operations to describe the exceptions that can be thrown by a method. It maintains a modifiable list of TypeCodes of the exceptions.

    The following code fragment demonstrates creating an ExceptionList object:

        ORB orb = ORB.init(args, null);
        org.omg.CORBA.ExceptionList excList = orb.create_exception_list();
     
    The variable excList represents an ExceptionList object with no TypeCode objects in it.

    To add items to the list, you first create a TypeCode object for the exception you want to include, using the ORB method create_exception_tc. Then you use the ExceptionList method add to add it to the list. The class ExceptionList has a method for getting the number of TypeCode objects in the list, and after items have been added, it is possible to call methods for accessing or deleting an item at a designated index.

    Since:
    JDK1.2
    • Constructor Summary

      Constructors 
      Constructor and Description
      ExceptionList() 

        

    • Method Summary

      Methods 
      Modifier and Type Method and Description
      abstract void add(TypeCode exc)
      Adds a TypeCode object describing an exception to this ExceptionList object.
      abstract int count()
      Retrieves the number of TypeCode objects in this ExceptionList object.
      abstract TypeCode item(int index)
      Returns the TypeCode object at the given index.
      abstract void remove(int index)
      Removes the TypeCode object at the given index.

        

    • Constructor Detail

      • ExceptionList

        public ExceptionList()
    • Method Detail

      • count

        public abstract int count()
        Retrieves the number of TypeCode objects in this ExceptionList object.
        Returns:
        the number of TypeCode objects in this ExceptionList object
      • add

        public abstract void add(TypeCode exc)
        Adds a TypeCode object describing an exception to this ExceptionList object.
        Parameters:
        exc - the TypeCode object to be added
      • item

        public abstract TypeCode item(int index)
                               throws Bounds
        Returns the TypeCode object at the given index. The first item is at index 0.
        Parameters:
        index - the index of the TypeCode object desired. This must be an int between 0 and the number of TypeCode objects minus one, inclusive.
        Returns:
        the TypeCode object at the given index
        Throws:
        Bounds - if the index given is greater than or equal to the number of TypeCode objects in this ExceptionList object
      • remove

        public abstract void remove(int index)
                             throws Bounds
        Removes the TypeCode object at the given index. Note that the indices of all the TypeCoded objects following the one deleted are shifted down by one.
        Parameters:
        index - the index of the TypeCode object to be removed. This must be an int between 0 and the number of TypeCode objects minus one, inclusive.
        Throws:
        Bounds - if the index is greater than or equal to the number of TypeCode objects in this ExceptionList object

Traduction non disponible

Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.

Document créé le 31/08/2006, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-org/omg/CORBA/ExceptionList.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.

Références

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com, ExceptionList

Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.

Table des matières Haut