// Copyright(c) 1996,1997 ObjectSpace, Inc.

import COM.objectspace.jgl.*;

/**
 * Exceptions.
 *
 * @see COM.objectspace.jgl.Deque
 * @version 2.0.2
 * @author ObjectSpace, Inc.
 */

public class Deque4
  {
  public static void main( String[] args )
    {
    Deque deque = new Deque();
    try
      {
      deque.popBack();
      }
    catch ( InvalidOperationException exception )
      {
      System.out.println( "Caught " + exception );
      }
    deque.add( "ape" );
    deque.add( "bat" );
    deque.add( "cat" );
    try
      {
      deque.at( 5 );
      }
    catch ( IndexOutOfBoundsException exception )
      {
      System.out.println( "Caught " + exception );
      }

    }
  }
