<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mar. 4 févr. 2020 à 16:04, Jean-Charles Quillet <<a href="mailto:jeancharles.quillet@gmail.com">jeancharles.quillet@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I've tried to raise QgsProcessingException. But from the output window, the exception does not seem to be well handled.</div></blockquote><div><br></div><div>This is, I think, the way to go. What do you mean by not well handled? You mean the display with the traceback? This has been fixed in latest QGIS versions. Maybe not in QGIS 3.8 which is not maintained anymore.</div><div><br></div><div>You should open the script template provided in QGIS Desktop : <a href="https://github.com/qgis/QGIS/blob/master/python/plugins/processing/script/ScriptTemplate.py#L136">https://github.com/qgis/QGIS/blob/master/python/plugins/processing/script/ScriptTemplate.py#L136</a></div></div></div>