I have made an ArcMap add-in which has the condition that only one feature can by selected a computed. If there are more features selected or no feature in the selection, a message will pop up that the script should be terminated. I am using the sys module and sys.exit(0) in the condition, but this command terminates ArcMap.
Is there something else that terminates only the running Python script, but not ArcMap entirely?
EDIT: I'm using ArcMap 10.4.