I have a massive recursive function that can easily overflow a system based on user input, and I wanted to know if there is a way to detect if you are about to run out of callstack space during runtime. Is there a way to check if I am going to blow the stack so I can terminate/do something else if I am about to?