cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar

When a JSL code block crashes, is it possible to post a dialog box with a simple message?

Hello,

I am trying to run a python script using JMP's Run Porgram to read a zipped file and parse the data. Occationally the Zip file has issues and python would through out an error message that " File is not a zip file"

 

Here is the JSL code block

rp = Run Program( executable( python_executable ), Options( {path_python_file, path_working_folder, path_datalog} ), readfunction( "text" ) );

 

When I execute the task from JSL I get the follwing error message.

 

image.png

 

is it possible to replace this error message with a simple error message such as " zip file import error"?

Thanks,

Shafi

1 REPLY 1
jthi
Super User

Re: When a JSL code block crashes, is it possible to post a dialog box with a simple message?

You should be able to do it using Try(). This is also a good read regarding Throws and error catching in JMP  Scripting Guide > Programming Methods > Advanced Programming Concepts > Throw and Catch Exceptions 

-Jarmo