cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use to use Text Explorer to glean valuable information from text data at April 25 webinar.
Choose Language Hide Translation Bar
View Original Published Thread

RUNNING A SCRIPT WITH TROW() IN IT

ankitgssingh
Level III

Hello Community, 

 

Is there any way in JMP to use try to keep the script running if some part of it fails but still give me a log file of the part that did not run? 

 

As if we use throw(), the script would stop as soon as it gets an error. I dont want the script to stop but I also want the error messages stored somewhere so that I can understand what did not work ? 

1 ACCEPTED SOLUTION

Accepted Solutions
Craige_Hales
Super User


Re: RUNNING A SCRIPT WITH TROW() IN IT

write("\!ntry some JSL...");
try(
	write("\!ntry 1...");
	junk("what would this do?");
	write("\!ntry 2...");
, // catch errors here
	write("\!nthis is what went wrong:",exception_msg);
);
write("\!nDid it work?");

try some JSL...
try 1...
this is what went wrong:{"Name Unresolved: junk"(1, 2, "junk", junk("what would this do?") /*###*/)}
Did it work?

Craige

View solution in original post

1 REPLY 1
Craige_Hales
Super User


Re: RUNNING A SCRIPT WITH TROW() IN IT

write("\!ntry some JSL...");
try(
	write("\!ntry 1...");
	junk("what would this do?");
	write("\!ntry 2...");
, // catch errors here
	write("\!nthis is what went wrong:",exception_msg);
);
write("\!nDid it work?");

try some JSL...
try 1...
this is what went wrong:{"Name Unresolved: junk"(1, 2, "junk", junk("what would this do?") /*###*/)}
Did it work?

Craige