I have some logic I'm working on that should end a script if a condition is not met. I tried:
if (type(startPos) == NoneType): sys.exit("Next Sheet Not Found")
But that causes Notepad++ to exit. Not the desired behavior! Is there a way to end the script without exiting NPP?
Thanks
What I do is making a main function out of the main part and using return instead.
Cheers Claudia
That will work, thank you.
Log in to post a comment.
I have some logic I'm working on that should end a script if a condition is not met. I tried:
But that causes Notepad++ to exit. Not the desired behavior! Is there a way to end the script without exiting NPP?
Thanks
What I do is making a main function out of the main part and using return instead.
Cheers
Claudia
That will work, thank you.