Open joaoe opened 6 years ago
Good idea!
With last version 1.2018.13, there is a setSilentlyCompletelyIgnoreErrors(boolean)
in OptionFlags
class.
Currently it's only active in SourceFileReader
class which may be not enough for you.
Can you tell us how you are integrating with PlantUML ?
Thanks,
I'm using Structurizr [1], which does not do any input validation, and then generates UML markup which apparently causes problems. Thank you.
[1] My code pretty much looks like this
// My code: fill in the model/workspace
Workspace workspace = new Workspace("title", "desc");
// Structurizr
StringWriter sw = new StringWriter();
PlantUMLWriter puw = new PlantUMLWriter()
puw.write(workspace, sw);
// And PlantUML
for (String section: sw.toString().split("(?=@startuml)")) {
SourceStringReader reader = new SourceStringReader(section);
reader.generateImage(os, new FileFormatoption(FileFormat.SVG));
// write os to file
}
Hi !
I'm using Structurizr in my project, which uses plantuml. For unimportant reasons, structurizr generates some uml code that is not valid, e..g. empty title. My diagram is generated truncated with an error at the top
Syntax error: title
.I'd like for plantuml not to generate and inject errors into my SVG diagram but instead to throw them so I can fix my program. As the program and diagram grows, it is quite unmaintainable to be debugging the output file manually to check for "syntax error".
So, suggestion: add flag to
net.sourceforge.plantuml.OptionFlags
likethrowErrors
and then each place anErrorUml
is created, throw it.Thank you.