Closed redcatbear closed 7 years ago
I've never seen this, but haven't used include either. I agree a less intrusive message is best, unfortunately there isn't an obvious place to put it, besides in the diagram (like what happens now, if there is a syntax error). My suggestion is to write the stack trace into an image in the diagram, as shown in the screenshot below.
The exception is thrown by PlantUML library itself. So we (ie PlantUML team) could change this behaviour and not throw an exception in that case. I think it is the best solution.
There needs to be an indication that the diagram cannot be generated. This happens now, if you type a file name that doesn't exist at all, but in the "usual" way as with syntax errors: You get an image with the error message. I suggest that the library should do the same with this case, to make it uniform.
There may still be errors that we don't know of, that could be reported as shown above. Summarising:
@hallvard, @arnaudroques: I agree that a consistent way to handle this case would be preferable. Rendering it into the document-internal error message sounds reasonable to me.
Side note: kudos for answering so quickly! This is what I call an actively maintained project. :+1:
A lot of the programmers I work with use PlantUML and the plug-in on a daily basis.
A new beta is available with better error handling : https://dl.dropboxusercontent.com/u/13064071/plantuml.jar
Right now, we just catch the exception and generate an error image. If this image generation is ok to you, we could make some checks in next versions (does the file exist? It is a real file? a directory?) to print a more user friendly message.
@arnaudroques: could you please publish the SHA256 of the dropbox file here on Github?
Sure hex: 8a1378134b099cde620541e9c3285b83199275210e76adbd86fd25a32bf44544 base64: ihN4E0sJnN5iBUHpwyhbgxmSdSEOdq29hv0loyv0RUQ=
The error message is rendered into the diagram:
The rendered image also tries to render a class diagram from the error message which looks kind of funny and is probably not intended.
I still get the pop-up when I exchange the plantuml.jar
in the plug-in under lib/plantUml
though, which looks like the exception still falls through.
Situation
When using the
!include
feature of PlantUML and stopping to type where the included path points to a directory, a pop-up dialog appears that contains ajava.io.FileNotFoundException
.This breaks the typing flow since users have to click away the pop-up in order to be able to type again.
When using the include feature this happens regularly since you typically stop a part of the path trying to remember the rest.
Expected behavior
Actual behavior
Reproducibility
100%
Steps to Reproduce
Screenshot
Environment
Eclipse 4.6.0, PlantUML Feature 1.1.8.8058, Linux (Ubuntu)
Also observed in older versions of the plug-in, other versions of Eclipse and on Windows.