ada: Fix exception raised on invalid contract in generic package
commit5225a2b2ecd8e876f7a879f70bb74d563ab953cd
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 24 Apr 2023 09:07:38 +0000 (24 11:07 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 13 Jun 2023 07:31:44 +0000 (13 09:31 +0200)
treefc425af4567428901546dcbc6c03224dcc5d53a1
parentad09934f72f2bf415c96170143b189e70514242b
ada: Fix exception raised on invalid contract in generic package

This lets the compiler give a proper error message instead.

gcc/ada/

* contracts.adb (Contract_Error): New exception.
(Add_Contract_Item): Raise Contract_Error instead of Program_Error.
(Add_Generic_Contract_Pragma): Deal with Contract_Error.
gcc/ada/contracts.adb