cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-693661%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ELorsqu'un%20bloc%20de%20code%20JSL%20plante%2C%20est-il%20possible%20de%20publier%20une%20bo%C3%AEte%20de%20dialogue%20avec%20un%20simple%20message%26nbsp%3B%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-693661%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EBonjour%2C%3C%2FP%3E%3CP%3EJ'essaie%20d'ex%C3%A9cuter%20un%20script%20Python%20%C3%A0%20l'aide%20de%20Run%20Porgram%20de%20JMP%20pour%20lire%20un%20fichier%20compress%C3%A9%20et%20analyser%20les%20donn%C3%A9es.%20Parfois%2C%20le%20fichier%20Zip%20pr%C3%A9sente%20des%20probl%C3%A8mes%20et%20Python%20affichera%20un%20message%20d'erreur%20indiquant%20%22Le%20fichier%20n'est%20pas%20un%20fichier%20zip%22.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EVoici%20le%20bloc%20de%20code%20JSL%3C%2FP%3E%3CP%3Erp%20%3D%20Ex%C3%A9cuter%20le%20programme%20(ex%C3%A9cutable%20(python_executable)%2C%20Options%20(%7Bpath_python_file%2C%20path_working_folder%2C%20path_datalog%7D)%2C%20readfunction%20(%22text%22%20)%20)%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELorsque%20j'ex%C3%A9cute%20la%20t%C3%A2che%20depuis%20JSL%2C%20je%20re%C3%A7ois%20le%20message%20d'erreur%20suivant.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20563px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20563px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20563px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20563px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20563px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20563px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20563px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20563px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20563px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F58269i7508C6654CFDF964%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eest-il%20possible%20de%20remplacer%20ce%20message%20d'erreur%20par%20un%20simple%20message%20d'erreur%20tel%20que%20%C2%AB%20erreur%20d'importation%20de%20fichier%20zip%20%C2%BB%20%3F%3C%2FP%3E%3CP%3EMerci%2C%3C%2FP%3E%3CP%3EShafi%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-693661%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CLINGO-LABEL%3EAutomatisation%20et%20scripts%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-693677%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%20%3A%20Lorsqu'un%20bloc%20de%20code%20JSL%20plante%2C%20est-il%20possible%20de%20publier%20une%20bo%C3%AEte%20de%20dialogue%20avec%20un%20simple%20message%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-693677%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EVous%20devriez%20pouvoir%20le%20faire%20en%20utilisant%3CA%20href%3D%22https%3A%2F%2Fwww.jmp.com%2Fsupport%2Fhelp%2Fen%2F17.2%2F%23page%2Fjmp%2Fprogramming-functions.shtml%3Fos%3Dwin%26amp%3Bsource%3Dapplication%23ww5022792%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%20Essayer()%3C%2FA%3E%20.%20C'est%20%C3%A9galement%20une%20bonne%20lecture%20concernant%20les%20lancers%20et%20la%20d%C3%A9tection%20d'erreurs%20dans%20JMP.%3CA%20href%3D%22https%3A%2F%2Fwww.jmp.com%2Fsupport%2Fhelp%2Fen%2F17.2%2F%23page%2Fjmp%2Fthrow-and-catch-exceptions.shtml%23%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%20Guide%20de%20script%20%26gt%3B%20M%C3%A9thodes%20de%20programmation%20%26gt%3B%20Concepts%20de%20programmation%20avanc%C3%A9s%20%26gt%3B%20Exceptions%20de%20lancement%20et%20d'interception%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
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

Recommended Articles