The recursion is sort of a \'divide and conquer\' style, it splits up while getting smaller (Tree data structure), and I want it to break completely if a violation is found,
Maybe you want to avoid recursion and replace it with a stack. This gives you the control to break out of the operation, while being able to do something that resembles a recursive operation. In fact you just emulate recursion by yourself.
I found a nice explanation here: http://haacked.com/archive/2007/03/04/Replacing_Recursion_With_a_Stack.aspx/