```
File "/home/mkuhn/.local/share/QGIS/QGIS3/profiles/default/python/plugins/autocurve/plugin.py", line 127, in curvify
AlgorithmExecutor.execute_in_place(alg, {})
File "/usr/share/qgis/python/plugins/processing/gui/AlgorithmExecutor.py", line 305, in execute_in_place
ok, results = execute_in_place_run(alg, parameters, context=context, feedback=feedback)
File "/usr/share/qgis/python/plugins/processing/gui/AlgorithmExecutor.py", line 214, in execute_in_place_run
results, ok = {'__count': current + 1}, True
UnboundLocalError: local variable 'current' referenced before assignment
```
don't raise a generic "something went wrong" exception but instead
ensure that the original exception with the proper error message
is raised for catching in Python instead
(e.g. parameters) when they are run in the "edit in-place" mode
This allows algorithms to dynamically adapt their behavior to make them compatible
with in-place mode. Previously, some useful algorithms could not be
run in-place because they alter a layer's structure (e.g. adding new
fields).
Now, these algorithms have a means to detect that they are being
run in-place and change their input parameters accordingly. E.g.
an algorithm which usually adds new fields to store calculated
values (such as "add xy fields to layer") could instead expose
field parameter choices to ask the user to pick from existing
fields in which to store the calculated values, thereby avoiding
the need to change the table structure and making them eligable
for running in-place mode.
Note that this needs to be handled algorithm-by-algorithm, it's
not automatic! It's just the raw api to allow this...
If the active layer is not editable, the executor will
try to switch editing on.
If there are no selected features, the executor will
select all features before running.
the original layer's feature
Otherwise python processFeature implementations may return a
modified shallow copy of this feature, which means that the
test for modifications fails, since we're comparing against
the same feature which was modified.
Fixes some python algorithms do not modify features when used
in-place mode.