Skip to content

Conversation

@nbrugger-tgm
Copy link
Contributor

ref: #924

The implementation is not as good as proposed, but it does like 98% of the work and is a lot less time invested

Example of a new Exception:

Caused by: java.lang.IllegalStateException: No such method : java/lang/String.replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
Current Analysis Stack is : 
Parsing method body of Lexample/MainClass;.main
 Parsing method body of Lcom/niton/jsx/JsxComponents;.App
  Parsing method body of Lcom/niton/jsx/JsxComponents;.JsxParserComponent
   Parsing method body of Lexample/JsxParserComponent;.initialize
    Parsing method body of Lexample/JsxParserComponent;.lambda$initialize$0
      Start of try catch block at org.objectweb.asm.tree.LabelNode@8e1a17df with handler L188279188 and type com/niton/parser/exceptions/ParsingException
      Check of stack size is ok
      Visiting #36 ASTORE Stack size is 1 Source line 35

@mirkosertic
Copy link
Owner

I investigated the exception chain further. It seems the easiest way to handle errors in the Maven mojo would be to catch and print the AnalysisException there. All kind of runtime exceptions during analysis are automatically wrapped into an AnalysisException at

. So I guess adding proper exception handling to the Maven mojo should fix this issue. This exception is already caught in BytecoderRunner and the CLI, but unfortunately the Maven plugin misses that.

@mirkosertic mirkosertic merged commit 99e37aa into mirkosertic:master Jun 15, 2023
@nbrugger-tgm nbrugger-tgm deleted the feat/924-improved_no_method_trace branch May 17, 2024 10:08
@nbrugger-tgm nbrugger-tgm restored the feat/924-improved_no_method_trace branch October 3, 2024 13:57
@nbrugger-tgm nbrugger-tgm deleted the feat/924-improved_no_method_trace branch October 3, 2024 13:58
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

Successfully merging this pull request may close these issues.

2 participants