@ale2x72 here is a sample solution that implements the base command class that has error handling and a conduit that can be cleaned up when the command ends.
We use exclusively net48 plugins, but I noticed in my debugging of Rhino 8 that if you run the plugin as a .NET 7 plugin, instead of net48 that your breakpoints won’t work properly.
So I suggest that when you run the solution you choose the net48 framework:
This solution has two commands that can be executed; SampleCommandNoCleanup and SampleCommandWithCleanup. There is a BaseCommand that does the magic for the SampleCommandWithCleanup that takes care of handling exceptions and disabling the conduit.

When you run either command you can complete it (pressing option C), and see that the conduit has a chance to cleanup, but if you instead cause the exception (pressing option E) only the With Cleanup command properly removes the conduit drawn curves.
The BaseCommand is quite simple, it has a _conduit that is used to hold onto the DisplayConduit for any command classes that inherit from BaseCommand. This conduit is then used to cleanup and turn off the display after the command completes.
Each command that implements base, will need to implement the EnglishName property and the Execute method. The RunCommandMethod is already implemented in the BaseCommand class for every command.
So now writing commands is quite simple, and they all get the benefit of the error handling and the conduit cleanup without having to write any of that logic.
In the below command, we create an assign our CurveConduit to the _conduit property of the base class, so it can later clean it up. We then assign attributes to the conduit as needed.
The CurveConduit class is very simplistic for example purposes only.
Let me know if you have any other questions, and good luck!
SamplePluginWithCleanupLogic.zip (218.9 KB)