I've been looking for a way to implement an error handler in a script.
Specifically, I have a script that accepts site names as arguments and displays heading and distance information. These are stored in a list. When a contract requirement is completed, KSP removes the site from the game. Which quickly clobbers my script trying to access a no longer existing object.
What I'm wondering, is there a common method for identifying such an object within the script and removing it or skipping over it in my list.
In other languages I would probably use a, "try" block.