I 've encountered the following issue (minimal example below). Is this a bug or am I missing something?
(Windows 11, JMP 18.0)
The following script crashes JMP instead of simply throwing the error:
Names Default To Here(1);
f = Function( {}, { sub_f },
sub_f = Function( {},
If( 1, Throw( "thrown", 1 ) );
Return( "ok" )
);
Return( sub_f() )
);
f()
In contrast to the above, without the traceback flag, it normally throws the "thrown" error.
Names Default To Here(1);
f = Function( {}, { sub_f },
sub_f = Function( {},
If( 1, Throw( "thrown" ) );
Return( "ok" )
);
Return( sub_f() )
);
f()
Also, the crash is prevented by trapping the Return() into Try().
Names Default To Here(1);
f = Function( {}, { sub_f },
sub_f = Function( {},
If( 1, Throw( "thrown", 1 ) );
Return( "ok" )
);
Try( Return( sub_f() ), Throw( "crash prevented" ) )
);
f()