AnsweredAssumed Answered

How to exit a python script tool but keep the geoprocessing window open?

Question asked by n.ueberschaeresri-rw-esridist Employee on Feb 16, 2019
Latest reply on Feb 18, 2019 by Dan_Patterson

Hi folks, 

I have some preconditions to run my python script tool, for example that you have to create a local copy for editing first when using a hosted feature service layer. I can use exit() with an if statement (I also tried exit(0) and exit(1)) and it stops my script but it "pretends" to have ran succesfully which it did not (because I stopped it before proceeding). I would like to show the user a last message so he knows what he has to do before running the script again. Like the system error messages you find in that geoprocessing window but more helpful ;-)