E := Errors.Table (E).Next;
- -- Skip deleted messages.
- -- Also skip continuation messages, as they have already been
- -- printed along the message they're attached to.
+ while E /= No_Error_Msg loop
+
+ -- Skip deleted messages.
+ -- Also skip continuation messages, as they have already been
+ -- printed along the message they're attached to.
+
+ if not Errors.Table (E).Deleted
+ and then not Errors.Table (E).Msg_Cont
+ then
+ Write_Char (',');
+ Output_JSON_Message (E);
+ end if;
- while E /= No_Error_Msg
- and then not Errors.Table (E).Deleted
- and then not Errors.Table (E).Msg_Cont
- loop
- Write_Char (',');
- Output_JSON_Message (E);
E := Errors.Table (E).Next;
end loop;
end if;