Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capture AssertionError in PlantUML rendering #1578

Closed
sentry-io bot opened this issue Mar 23, 2024 · 1 comment
Closed

Capture AssertionError in PlantUML rendering #1578

sentry-io bot opened this issue Mar 23, 2024 · 1 comment
Assignees

Comments

@sentry-io
Copy link

sentry-io bot commented Mar 23, 2024

Sentry Issue: ASCIIDOC-INTELLIJ-PLUGIN-7EK

java.lang.AssertionError: null
    at net.sourceforge.plantuml.objectdiagram.command.CommandCreateJson.getJsonString(net/sourceforge/plantuml/objectdiagram/command/CommandCreateJson.java:166)
    at net.sourceforge.plantuml.objectdiagram.command.CommandCreateJson.getJsonValue(net/sourceforge/plantuml/objectdiagram/command/CommandCreateJson.java:151)
    at net.sourceforge.plantuml.objectdiagram.command.CommandCreateJson.finalVerification(net/sourceforge/plantuml/objectdiagram/command/CommandCreateJson.java:142)
    at net.sourceforge.plantuml.command.CommandMultilines2.isValid(net/sourceforge/plantuml/command/CommandMultilines2.java:133)
    at net.sourceforge.plantuml.command.PSystemCommandFactory.isMultilineCommandOk(net/sourceforge/plantuml/command/PSystemCommandFactory.java:211)
    at net.sourceforge.plantuml.command.PSystemCommandFactory.getCandidate(net/sourceforge/plantuml/command/PSystemCommandFactory.java:195)
    at net.sourceforge.plantuml.command.PSystemCommandFactory.executeFewLines(net/sourceforge/plantuml/command/PSystemCommandFactory.java:148)
    at net.sourceforge.plantuml.command.PSystemCommandFactory.createSystem(net/sourceforge/plantuml/command/PSystemCommandFactory.java:138)
    at net.sourceforge.plantuml.PSystemBuilder.createPSystem(net/sourceforge/plantuml/PSystemBuilder.java:187)
    at net.sourceforge.plantuml.BlockUml.getDiagram(net/sourceforge/plantuml/BlockUml.java:216)
    at org.asciidoctor.diagram.plantuml.PlantUMLPreprocessor.preprocess(org/asciidoctor/diagram/plantuml/PlantUMLPreprocessor.java:95)
    at org.asciidoctor.diagram.plantuml.PlantUMLPreprocessor.generate(org/asciidoctor/diagram/plantuml/PlantUMLPreprocessor.java:52)
    at org.asciidoctor.diagram.CommandProcessor.processRequest(org/asciidoctor/diagram/CommandProcessor.java:40)
    at org.asciidoctor.diagram.CommandProcessor.processRequest(org/asciidoctor/diagram/CommandProcessor.java:19)
    at jdk.internal.reflect.GeneratedMethodAccessor896.invoke(jdk/internal/reflect/GeneratedMethodAccessor896)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(jdk/internal/reflect/DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:568)
    at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:315)
    at org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:176)
    at RUBY.send_request(uri:classloader:/gems/asciidoctor-diagram-2.3.0/lib/asciidoctor-diagram/util/java_jruby.rb:31)
    at RUBY.load_code(uri:classloader:/gems/asciidoctor-diagram-2.3.0/lib/asciidoctor-diagram/plantuml/converter.rb:169)
    at RUBY.code(uri:classloader:/gems/asciidoctor-diagram-2.3.0/lib/asciidoctor-diagram/plantuml/converter.rb:153)
    at RUBY.convert(uri:classloader:/gems/asciidoctor-diagram-2.3.0/lib/asciidoctor-diagram/plantuml/converter.rb:85)
    at RUBY.create_image_block(uri:classloader:/gems/asciidoctor-diagram-2.3.0/lib/asciidoctor-diagram/diagram_processor.rb:189)
    at RUBY.process(uri:classloader:/gems/asciidoctor-diagram-2.3.0/lib/asciidoctor-diagram/diagram_processor.rb:99)
    at RUBY.process(<script>:28)
    at org.jruby.RubyMethod.call(org/jruby/RubyMethod.java:144)
    at org.jruby.RubyMethod$INVOKER$i$call.call(org/jruby/RubyMethod$INVOKER$i$call.gen)
    at RUBY.build_block(uri:classloader:/gems/asciidoctor-2.0.20/lib/asciidoctor/parser.rb:1056)
    at uri_3a_classloader_3a_.gems.asciidoctor_minus_2_dot_0_dot_20.lib.asciidoctor.parser.invokeOther80:build_block(uri_3a_classloader_3a_/gems/asciidoctor_minus_2_dot_0_dot_20/lib/asciidoctor/uri:classloader:/gems/asciidoctor-2.0.20/lib/asciidoctor/parser.rb:907)
    at uri_3a_classloader_3a_.gems.asciidoctor_minus_2_dot_0_dot_20.lib.asciidoctor.parser.next_block(uri:classloader:/gems/asciidoctor-2.0.20/lib/asciidoctor/parser.rb:907)
    at uri_3a_classloader_3a_.gems.asciidoctor_minus_2_dot_0_dot_20.lib.asciidoctor.parser.invokeOther70:next_block(uri_3a_classloader_3a_/gems/asciidoctor_minus_2_dot_0_dot_20/lib/asciidoctor/uri:classloader:/gems/asciidoctor-2.0.20/lib/asciidoctor/parser.rb:397)
    at uri_3a_classloader_3a_.gems.asciidoctor_minus_2_dot_0_dot_20.lib.asciidoctor.parser.next_section(uri:classloader:/gems/asciidoctor-2.0.20/lib/asciidoctor/parser.rb:397)
    at RUBY.parse(uri:classloader:/gems/asciidoctor-2.0.20/lib/asciidoctor/parser.rb:97)
    at RUBY.parse(uri:classloader:/gems/asciidoctor-2.0.20/lib/asciidoctor/document.rb:538)
    at RUBY.load(uri:classloader:/gems/asciidoctor-2.0.20/lib/asciidoctor/load.rb:84)
    at RUBY.convert(uri:classloader:/gems/asciidoctor-2.0.20/lib/asciidoctor/convert.rb:78)
    at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:792)
    at org.jruby.RubyBasicObject.callMethod(org/jruby/RubyBasicObject.java:371)
    at org.asciidoctor.jruby.internal.JRubyAsciidoctor.convert(org/asciidoctor/jruby/internal/JRubyAsciidoctor.java:321)
    at org.asciidoctor.jruby.internal.JRubyAsciidoctor.convert(org/asciidoctor/jruby/internal/JRubyAsciidoctor.java:346)
    at org.asciidoctor.jruby.internal.JRubyAsciidoctor.convert(org/asciidoctor/jruby/internal/JRubyAsciidoctor.java:341)
    at org.asciidoc.intellij.AsciiDocWrapper.render(org/asciidoc/intellij/AsciiDocWrapper.java:822)
    at org.asciidoc.intellij.AsciiDocWrapper.render(org/asciidoc/intellij/AsciiDocWrapper.java:788)
    at org.asciidoc.intellij.AsciiDocWrapper.render(org/asciidoc/intellij/AsciiDocWrapper.java:777)
    at org.asciidoc.intellij.editor.AsciiDocPreviewEditor.lambda$render$0(org/asciidoc/intellij/editor/AsciiDocPreviewEditor.java:152)
...
(50 additional frame(s) were not displayed)
@ahus1
Copy link
Contributor

ahus1 commented Mar 23, 2024

Normally, you should not catch errors, and only throw errors when they are fatal. Still, catching this AssertionError seems to be without alternative to capture the error message for the preview.

Fixed in next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant