with Remote_Global;
use Remote_Global;
package body Except_Pack_5 is

    task body Except_Task_5 is
    begin
        loop
            begin
                accept Task_5 (Switch : Boolean) do
                    if Switch then
                        raise
                           My_Exception; -- one increment below, one in caller
                    else
                        Global := Global + 2;
                        Remote;
                    end if;
                end Task_5;
            exception
                when My_Exception =>
                    Global := Global + 1;
                    Remote;
            end;
        end loop;

    end Except_Task_5;

end Except_Pack_5;