cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
hogi
Level XI

Error tracing: JMP tries to "help"

JMP helps the user to "trace" errors in JSL code: It doesn't indicate the line of code where the error "happens".
It tries to find out where the actual error is in the code and shows this line.

In the below example, the error message just shows up if line 6 is uncommented --> error "happens"  in line 6.
But the erroneous code (Graph Bulder without "i") is in line 4.

And JMP, indeed mentions line 4 -> amazing! very helpful   

 

hogi_0-1668343501469.png

 

Often it's great that JMP does this first step of error tracing automatically.

But sometimes it's misleading (wrong).

 

An example:
With it's functionality to trace errors back to where the variable was defined, JMP asks the user to fix the code in line 2.

With too much trust in what JMP is saying, it will take a while to find out that the error is actually in line 12 - definitely doesn't make sense to run a line just with a command which just a GraphBuilder object understands.

Just imagine how complicate it can get if the error is less obvious than this one here - if JMP tells you the wrong line of code and you don't have any clue in which line of code it actually happened ...

hogi_1-1668349400630.png

 

 

 

Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
myVariables = Expr(Variables( X( :height ), Y( :weight ) ));
//myVariables = Insert(Expr(myVariables), Expr(Overlay(:sex)));
Substitute(Expr( Graph Builder(
Variables( X( :height ), Y( :weight ) ),
	Name Expr(myVariables))),"hallo","hello")
	

 

1 REPLY 1
hogi
Level XI

Re: Error tracing: JMP tries to "help"

wish to add to write as well to the log the line of code at which the error "happens":
https://community.jmp.com/t5/JMP-Wish-List/jmp-embedded-log-additional-functionality/idi-p/568614