Each thread will have its own stack. For every method call it will put the entry in the stack and after the execution of method the entry will be popped. So , once the stack entries exceeds the size of stack you will get StackOverflowError.
If you want to catch "StackOverflowError" , you have to catch "StackOverflowError" "Error" or "Throwable". "Throwable" is the root of exception hierarchy and "Error" and "Exception" are subclasses of "Throwable" and "Exception" cannot catch "Error"