Skip to content
Advertisement

What is the proper way to exit the whole script?

JavaScript

So it should raise a recursion error after some time and when it does that I want to exit the whole code.

So what I am trying to get is:

JavaScript

But it gives something like:

JavaScript

So when it raises that error I want to do something and that’s all, just quit, no more trying

Advertisement

Answer

You need to add the base Exception type to the except and it will work.

JavaScript
Advertisement