This behavior is different from before, as before change 06baa8ed2c841c8a6e32ed785302f98febce676e and errors in PlantUML processing would be handled by the begin/end/rescue block in convert.rb and would render a text block with a message instead of the diagram on all errors as default.
Unfortunately errors that occur in wrap_source are before the "begin", therefore the exception will bubble up and no error text will be put into the document.
When users have a preview that renders automatically when typing text (like in the IntelliJ plugin), it would be nice if these kind of errors would display as text blocks, so that an error in the PlantUML wouldn't destroy the complete preview.
Therefore I would expect preprocessor errors to be handled like any other error.
My (maybe naive) suggestion: Move wrap_source in the begin, so that is participates in the error handling. Its hard for me to tell if this would break other people's expectations.
When adding the following snippet to an AsciiDoc file,
the rendering terminates, and no HTML output is produced. Instead there is an exception for with an error message:
This behavior is different from before, as before change 06baa8ed2c841c8a6e32ed785302f98febce676e and errors in PlantUML processing would be handled by the begin/end/rescue block in convert.rb and would render a text block with a message instead of the diagram on all errors as default.
Unfortunately errors that occur in wrap_source are before the "begin", therefore the exception will bubble up and no error text will be put into the document.
When users have a preview that renders automatically when typing text (like in the IntelliJ plugin), it would be nice if these kind of errors would display as text blocks, so that an error in the PlantUML wouldn't destroy the complete preview.
Therefore I would expect preprocessor errors to be handled like any other error.
My (maybe naive) suggestion: Move wrap_source in the begin, so that is participates in the error handling. Its hard for me to tell if this would break other people's expectations.