mirror of
https://github.com/AdaCore/gprbuild.git
synced 2026-02-12 12:30:13 -08:00
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gprmake@43597 936e1b1b-40f2-da11-902a-00137254ae57
24 lines
460 B
Ada
24 lines
460 B
Ada
with Text_IO; use Text_IO;
|
|
|
|
procedure Call_CPP is
|
|
procedure cpp_routine;
|
|
pragma Import (C, cpp_routine);
|
|
Error : exception;
|
|
|
|
procedure Raise_And_Catch is
|
|
begin
|
|
Put ("in Ada: raise ... ");
|
|
raise Error;
|
|
exception
|
|
when Error =>
|
|
Put_Line ("and catch!");
|
|
end Raise_And_Catch;
|
|
|
|
begin
|
|
Put_Line ("In Call_CPP");
|
|
Raise_And_Catch;
|
|
cpp_routine;
|
|
Put_Line ("Back in Call_CPP");
|
|
Raise_And_Catch;
|
|
end Call_CPP;
|