[SOLVED] Cancel plugin execution
https://forum.zettelkasten.de/discussion/2994/bug-extract-note-null-check#latest
Plugins currently can only cancel by throwing an error, which then is shown to the user as an error. That's not good.
cancel()
or some such would help.
Or a special error type that signals stack unwinding and cancellation.
Post edited by ctietze on
Author at Zettelkasten.de • https://christiantietze.de/
Howdy, Stranger!
Comments
The next update will ship with a
cancel()
function.Alternatives considered:
throw new Cancellation()
-- I checked whether using JavaScript errors to 'unwind the stack' would be a good idea, but error propagation into the hosting app is very brittle. Function calls are easier in that regard.exit()
, potentially with result value, like bash scripts and C would offerTell me what you think about this!
Author at Zettelkasten.de • https://christiantietze.de/
cancel()
was implemented in an October releaseAuthor at Zettelkasten.de • https://christiantietze.de/