cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
ankitgssingh
Level III

RUNNING A SCRIPT WITH TROW() IN IT

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