detect.errors | R Documentation |
This function parses the draw.io output to detect errors.
detect.errors(output)
output |
The output result from the invocation of draw.io, i.e., the standard output and error streams (stdout and stderr) combined. It should be a vector of characters, where each element is a line. |
Drawio may encounter errors when invoked, i.e., when exporting a diagram, for example the diagram source file may be incorrect. However, they are not visible to the user, because:
draw.io is an invoked process that knitr does not know about.
draw.io never returns a non-0 code that would indicate an error.
Instead, errors are reported in the output (stdout / stderr). These errors need to be detected automatically by knitrdrawio, so that they can be reported to the user, and eventually stop the knitr process if they are blocking.
Additionally, this function is responsible for ignoring known errors that are not linked to draw.io itself (for example, errors related to dbus or dri3).
Error lines filtered from the output
param, if they exist, or
NULL
otherwise.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.