diff options
-rw-r--r-- | src/errorout-memory.adb | 5 | ||||
-rw-r--r-- | src/errorout.adb | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/errorout-memory.adb b/src/errorout-memory.adb index c0e6cd1df..a13e5c668 100644 --- a/src/errorout-memory.adb +++ b/src/errorout-memory.adb @@ -115,7 +115,10 @@ package body Errorout.Memory is pragma Assert (Group /= Msg_Single); case Errors.Table (Errors.Last).Header.Group is when Msg_Single | Msg_Last => - raise Internal_Error; + -- Check consistency until messages are discarded. + if Nbr_Errors <= Max_Nbr_Errors then + raise Internal_Error; + end if; when Msg_Main => Errors.Table (Errors.Last).Header.Group := Msg_Single; when Msg_Related => diff --git a/src/errorout.adb b/src/errorout.adb index 98a844c7b..5e706c475 100644 --- a/src/errorout.adb +++ b/src/errorout.adb @@ -202,7 +202,7 @@ package body Errorout is and then New_Id = Msgid_Error then if Nbr_Errors = Max_Nbr_Errors then - -- Limit reached. Emit a message. + -- Limit reached. Emit a message on the first message. Report_Handler.Error_Start (Err => (Option, Msgid_Error, No_Source_File_Entry, 0, 0, 0)); |