The Processing IDE reports wrong source code location for a programming error in .java-files
The Processing IDE should change such that errors are reported correctly. This severely degrades the overall usability of the Processing IDE. I degrades programmer's productivity.
Expected Behavior
When I include .java files in my sketch and I make programming errors, I would expect that the Processing IDE shows the errors at the right source code location.
Current Behavior
Instead it reports the error in the same file but with the wrong line number.
Steps to Reproduce
My sketch contains two files:
BrokenErrorMessage.pde, whose content is irrelevant, and
SomeJavaCodeWithErrors.java:
public class SomeJavaCodeWithErrors // line 1
{ // line 2
public static int testMe() // line 3
{ // line 4
// provoking an error! // line 5
return asdflkj; // line 6, error, but it is reported be on line 3
}
}
When I hit the "play" button in the Processing IDE, I, of course, do get an error:
The variable "asdflkj" does not exist, but the source code location refers to line 3.
However, I would have expected the line number of the error not to be 6 and instead be 3.
Your Environment
Processing version: 4.3
Operating System and OS version: Windows 10 Enterprise 22H2
The Processing IDE reports wrong source code location for a programming error in .java-files
The Processing IDE should change such that errors are reported correctly. This severely degrades the overall usability of the Processing IDE. I degrades programmer's productivity.
Expected Behavior
When I include .java files in my sketch and I make programming errors, I would expect that the Processing IDE shows the errors at the right source code location.
Current Behavior
Instead it reports the error in the same file but with the wrong line number.
Steps to Reproduce
My sketch contains two files:
BrokenErrorMessage.pde
, whose content is irrelevant, andSomeJavaCodeWithErrors.java
:When I hit the "play" button in the Processing IDE, I, of course, do get an error:
The variable "asdflkj" does not exist
, but the source code location refers to line3
.However, I would have expected the line number of the error not to be
6
and instead be3
.Your Environment
Possible Causes / Solutions
In the Processing forum, we have already discussed the bug here https://discourse.processing.org/t/wrong-line-numbers-in-error-messages-when-using-java-files/43983 and concluded to raise an issue on github.