[QGIS-Developer] What’s the purpose of fatalError argument in QgsProcessingFeedback.reportError() ?

Nyall Dawson nyall.dawson at gmail.com
Sun Sep 29 16:02:40 PDT 2024


On Mon, 23 Sept 2024 at 22:34, Nicolas Godet via QGIS-Developer
<qgis-developer at lists.osgeo.org> wrote:
>
> Hi Julien,
>
> I was referring to https://github.com/qgis/QGIS/blob/0b11a7c36c446c37534c3c4c8f25c803640b780a/src/core/processing/qgsprocessingfeedback.cpp#L62-L69.
>
> Looking at the calls to this method in the algorithms, I came to the same explanation as you.
> But maybe I was missing something...

It's basically just there for legacy reasons (it was part of the
original port of processing to c++ in 3.0), and doesn't serve a real
purpose in current supported versions. We should remove it for 4.0.

Nyall


>
> Thanks !
> Nicolas
>
> ________________________________
> De : Julien Cabieces <julien.cabieces at oslandia.com>
> Envoyé : lundi 23 septembre 2024 10:39
> À : Nicolas Godet via QGIS-Developer <qgis-developer at lists.osgeo.org>
> Cc : Nicolas Godet <nicolas.godet at outlook.fr>
> Objet : Re: [QGIS-Developer] What’s the purpose of fatalError argument in QgsProcessingFeedback.reportError() ?
>
>
> Hi Nicolas,
>
>
> > Dear devs,
> >
> > Title says it all. Looking at the code, this argument is never used.
> >
>
> It is actually https://github.com/qgis/QGIS/blob/a2626a2a427afc5d139061e43ade0e62bafda8ad/src/analysis/processing/qgsalgorithmdissolve.cpp#L303
>
> > I first understood it would stop the algorithm but no.
>
> It doesn't stop the algorithm, the algorithm has to
> stop by itself after it detects and report the fatal error. This boolean is usefull
> for other classes that would implement feedback to be aware that the
> algorithm has to stop, and so act as such, like printing a red colored
> message FATAL ERROR for instance.
>
> This is how I understand the rationale of this boolean.
>
> > Sorry for my ignorance…
> >
>
> Don't be :)
>
> Regards,
> Julien
>
> > Regards,
> > Nicolas
> > _______________________________________________
> > QGIS-Developer mailing list
> > QGIS-Developer at lists.osgeo.org
> > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
> --
>
> Julien Cabieces
> Senior Developer at Oslandia
> julien.cabieces at oslandia.com
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the QGIS-Developer mailing list