<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error message - which line? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Error-message-which-line/m-p/930174#M108713</link>
    <description>&lt;P&gt;Ah:&amp;nbsp;&lt;LI-MESSAGE title="Error Types" uid="228628" url="https://community.jmp.com/t5/JMP-Wish-List/Error-Types/m-p/228628#U228628" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-idea-thread lia-fa-icon lia-fa-idea lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp; by&amp;nbsp;&lt;LI-MESSAGE title="Vince Faller" uid="756725" url="https://community.jmp.com/t5/Speakers/Vince-Faller/m-p/756725#U756725" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1770746969836.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/93636i81A2E509E26A4F66/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1770746969836.png" alt="hogi_0-1770746969836.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14379"&gt;@Ryan_Gilmore&lt;/a&gt;&amp;nbsp;, could you please re-activate the wish for voting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/51054"&gt;@Ben_BarrIngh&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3764"&gt;@russ_wolfinger&lt;/a&gt;&amp;nbsp;, fyi.&lt;/P&gt;</description>
    <pubDate>Tue, 10 Feb 2026 18:09:39 GMT</pubDate>
    <dc:creator>hogi</dc:creator>
    <dc:date>2026-02-10T18:09:39Z</dc:date>
    <item>
      <title>Error message - which line?</title>
      <link>https://community.jmp.com/t5/Discussions/Error-message-which-line/m-p/929976#M108696</link>
      <description>&lt;P&gt;JMP helps the user to find errors in the code. If an unresolved&amp;nbsp; name is used in the code, JMP stops the evaluation and shows an error message - pointing to the erronous line of code&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;print(1);
result = x + zzz_missing;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1770822119269.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/93718i2391BB623E447529/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1770822119269.png" alt="hogi_0-1770822119269.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let's make a slight change to the code. When JMP runs this code&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;myFunc = Function( {x},
	{},
	result = x + zzz_missing;
	Return( result );
);
myFunc( 3 );
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;it returns again an error message:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1770680122317.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/93538i42DBDF7A0DA2A2C0/image-size/large?v=v2&amp;amp;px=999" role="button" title="hogi_0-1770680122317.png" alt="hogi_0-1770680122317.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;P&gt;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 &lt;FONT face="courier new,courier"&gt;Name expr()&lt;/FONT&gt;&amp;nbsp; to protect &lt;FONT face="courier new,courier"&gt;result&lt;/FONT&gt; - and JMP accidentally evaluates the expression!&lt;/P&gt;
&lt;P&gt;As we have already discussed this behavior in another post ( &lt;LI-MESSAGE title="Error tracing: JMP tries to &amp;amp;quot;help&amp;amp;quot;" uid="568587" url="https://community.jmp.com/t5/Discussions/Error-tracing-JMP-tries-to-quot-help-quot/m-p/568587#U568587" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;), we will directly move on to the next surprise.&lt;/P&gt;
&lt;P&gt;Indeed, even more surprising is the error message for this code:&lt;/P&gt;
&lt;/DIV&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;myFunc = Function( {x},
	{Default Local},
	result = x + zzz_missing;
	Return( result );
);
myFunc( 3 );
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_1-1770680211494.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/93539i82FE907952B3F0BA/image-size/large?v=v2&amp;amp;px=999" role="button" title="hogi_1-1770680211494.png" alt="hogi_1-1770680211494.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;-&amp;gt; no info about the line !?! - not even a wrong one.&lt;/P&gt;
&lt;P&gt;why?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Feb 2026 15:08:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Error-message-which-line/m-p/929976#M108696</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2026-02-11T15:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: Error message - which line?</title>
      <link>https://community.jmp.com/t5/Discussions/Error-message-which-line/m-p/930164#M108709</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;Log Capture&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;according to scripting index, it captures the output to the log and returns it as a string.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1770745977324.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/93629i1BC76A56959F21BC/image-size/large?v=v2&amp;amp;px=999" role="button" title="hogi_0-1770745977324.png" alt="hogi_0-1770745977324.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;but it does more than this!&lt;/P&gt;
&lt;P&gt;It acts like &lt;FONT face="courier new,courier"&gt;try()&lt;/FONT&gt; - and allows the execution of the code to continue after a&amp;nbsp; fatal error inside the evaluated expression.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;log=Log capture(
   result = zzz_missing;
   print(1)
);
Print(2);
Show(log)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;print(1)&lt;/FONT&gt; is skipped - &lt;FONT face="courier new,courier"&gt;print(2)&lt;/FONT&gt; is executed.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_2-1770746341174.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/93632iCCCF0AA864BB9DE3/image-size/large?v=v2&amp;amp;px=999" role="button" title="hogi_2-1770746341174.png" alt="hogi_2-1770746341174.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;almost perfect. Unfortunately (!) it forgets to write the line of code where the error occurs!&lt;/P&gt;</description>
      <pubDate>Wed, 11 Feb 2026 07:12:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Error-message-which-line/m-p/930164#M108709</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2026-02-11T07:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: Error message - which line?</title>
      <link>https://community.jmp.com/t5/Discussions/Error-message-which-line/m-p/930167#M108710</link>
      <description>&lt;P&gt;Same restriction with Try(): no info about the line of code&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Try(
	result = zzz_missing;
	Print( 1 );
,
	Print( exception_msg )
	
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_3-1770746458783.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/93633i5E968388334BDA3C/image-size/large?v=v2&amp;amp;px=999" role="button" title="hogi_3-1770746458783.png" alt="hogi_3-1770746458783.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Feb 2026 18:01:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Error-message-which-line/m-p/930167#M108710</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2026-02-10T18:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: Error message - which line?</title>
      <link>https://community.jmp.com/t5/Discussions/Error-message-which-line/m-p/930169#M108712</link>
      <description>&lt;P&gt;Is there a command&lt;BR /&gt;- like &lt;FONT face="courier new,courier"&gt;log Capture()&lt;/FONT&gt; or &lt;FONT face="courier new,courier"&gt;Try()&lt;/FONT&gt;&amp;nbsp;- which doesn't stop when there is an error in the enclosed expression&lt;/P&gt;
&lt;P&gt;-&amp;nbsp;which returns the line of code that produces the error?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Feb 2026 18:03:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Error-message-which-line/m-p/930169#M108712</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2026-02-10T18:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: Error message - which line?</title>
      <link>https://community.jmp.com/t5/Discussions/Error-message-which-line/m-p/930174#M108713</link>
      <description>&lt;P&gt;Ah:&amp;nbsp;&lt;LI-MESSAGE title="Error Types" uid="228628" url="https://community.jmp.com/t5/JMP-Wish-List/Error-Types/m-p/228628#U228628" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-idea-thread lia-fa-icon lia-fa-idea lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp; by&amp;nbsp;&lt;LI-MESSAGE title="Vince Faller" uid="756725" url="https://community.jmp.com/t5/Speakers/Vince-Faller/m-p/756725#U756725" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1770746969836.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/93636i81A2E509E26A4F66/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1770746969836.png" alt="hogi_0-1770746969836.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14379"&gt;@Ryan_Gilmore&lt;/a&gt;&amp;nbsp;, could you please re-activate the wish for voting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/51054"&gt;@Ben_BarrIngh&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3764"&gt;@russ_wolfinger&lt;/a&gt;&amp;nbsp;, fyi.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Feb 2026 18:09:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Error-message-which-line/m-p/930174#M108713</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2026-02-10T18:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Error message - which line?</title>
      <link>https://community.jmp.com/t5/Discussions/Error-message-which-line/m-p/930175#M108714</link>
      <description>&lt;P&gt;maybe combine the request with this one:&lt;BR /&gt;&lt;LI-MESSAGE title="Improved JSL Stack Trace in Log on Error" uid="78104" url="https://community.jmp.com/t5/JMP-Wish-List/Improved-JSL-Stack-Trace-in-Log-on-Error/m-p/78104#U78104" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-idea-thread lia-fa-icon lia-fa-idea lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Feb 2026 18:13:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Error-message-which-line/m-p/930175#M108714</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2026-02-10T18:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error message - which line?</title>
      <link>https://community.jmp.com/t5/Discussions/Error-message-which-line/m-p/930177#M108715</link>
      <description>&lt;P&gt;By the way - does anybody know what is returned in the exception message ?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1770747463637.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/93637i73911CA952486F1C/image-size/large?v=v2&amp;amp;px=999" role="button" title="hogi_0-1770747463637.png" alt="hogi_0-1770747463637.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;1?&lt;/P&gt;
&lt;P&gt;2?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Feb 2026 18:18:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Error-message-which-line/m-p/930177#M108715</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2026-02-10T18:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: Error message - which line?</title>
      <link>https://community.jmp.com/t5/Discussions/Error-message-which-line/m-p/930180#M108716</link>
      <description>&lt;P&gt;Can a JSL code trigger a "child" execution - which might die with an error message about the line of error?&lt;BR /&gt;And the main code still survives and is executed further, either when the child execution is finished - or when the child execution is terminated?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Feb 2026 18:22:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Error-message-which-line/m-p/930180#M108716</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2026-02-10T18:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: Error message - which line?</title>
      <link>https://community.jmp.com/t5/Discussions/Error-message-which-line/m-p/930240#M108721</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// demo command 
MyExpr = Expr(
	Print( 1 );
	z = 5;
	x = xyz;
	Print( 2 );
);




stopnow = 0; // if there is an error, don't execute subsequent blocks of code
summary = "";

// execute blocks of code and collect replies and error messages
For Each( {part, line}, Name Expr( myExpr ), 
	Try(
		Eval( Name Expr( part ) );
		new = "";
	,
		new = "part " || Char( line ) || ":   " || Char( Name Expr( part ) ) || "\!n" || Char( exception_msg );
		stopNow = 1;
	);
	Wait( 0 );
	summary = summary || new || (tmp = Char( Get Log( -1 )[1] ) ; If( tmp == "/*:", "", "\!N" || tmp || "\!N" ));
	Clear Log();
	If( stopnow, break() );
);
Show(summary);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1770757836242.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/93648i62550E20B22547F2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1770757836242.png" alt="hogi_0-1770757836242.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Assumes trivial code with&amp;nbsp; &amp;lt;=1 reply per code block.&lt;BR /&gt;Can be easily extended to work with more complicated code.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Feb 2026 21:11:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Error-message-which-line/m-p/930240#M108721</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2026-02-10T21:11:56Z</dc:date>
    </item>
  </channel>
</rss>

