You've already forked gnatformat
mirror of
https://github.com/AdaCore/gnatformat.git
synced 2026-02-12 13:13:05 -08:00
Emit error when a source contains diagnostics (for instance, syntax errors). Continue execution is the --keep-going switch was provided. Extract the logic of the callback given to GPR2 For_Each_Ada_Closure so that the error handling method could be homogeneous. For_Each_Ada_Closure does not provide a way to stop the iteration in case the action fails. Furthermore, there are two callbacks involved, so exception propagation and handling has to be used for control flow. This is important for the correct and homogeneous handling of the --keep-going switch. In this context, homogeneous means that source processing is the same if a project is provided (and therefore, GPR2 is used) or not.