How would I get a main function to exit all successive functions if there is an error in one of them. I created an error handler on the main function, but I needed to create an additional error handler in one of the functions - because if there is an error in that specific function somewhere in the middle of running I need it to revert the changes it made. Upon testing it - the local error handler worked ok and exited that function but then it resumed running the rest of the functions from the main function and it did not go to the error handler on the main function which causes problems to the next function.