JMP helps the user to find errors in the code. If an unresolved name is used in the code, JMP stops the evaluation and shows an error message - pointing to the erronous line of code
print(1);
result = x + zzz_missing;

Let's make a slight change to the code. When JMP runs this code
myFunc = Function( {x},
{},
result = x + zzz_missing;
Return( result );
);
myFunc( 3 );
it returns again an error message:

But it points to line 3 of the code where x is defined. This is very surprising: the error "happens" in line 4 : the user missed a Name expr() to protect result - and JMP accidentally evaluates the expression!
As we have already discussed this behavior in another post ( Error tracing: JMP tries to "help" ), we will directly move on to the next surprise.
Indeed, even more surprising is the error message for this code:
myFunc = Function( {x},
{Default Local},
result = x + zzz_missing;
Return( result );
);
myFunc( 3 );

-> no info about the line !?! - not even a wrong one.
why?