with Queue_Pack_Exceptions; use Queue_Pack_Exceptions;
with Ada.Text_IO; use Ada.Text_IO;
procedure Queue_Test_Exceptions is
Queue : Queue_Type;
Item : Element;
begin
Enqueue (Turn, Queue);
Dequeue (Item, Queue);
Dequeue (Item, Queue); -- will produce a 'Queue underflow'
exception
when Queueunderflow => Put ("Queue underflow");
when Queueoverflow => Put ("Queue overflow");
end Queue_Test_Exceptions;