Edit: rewrote from scratch, the old question wasn't useful
I've got an error occuring after throwing an exception inside recursion.
The exception is not caught anywhere, it should just pop up and show uncaught exception error, which it doesn't. Instead, it produces time limit hit kind of error. If I put var_dumps in my code, it looks like the exception is thrown, but then it just freezes and fails after it exceeds limit.
this is part of the recursive function:
if($this->prvky[$iA]->ini < 1 || $this->prvky[$iB]->ini < 1){
echo '--- THROWING ---';
throw new \OutOfBoundsException('ini is smaller than 1');
}
It runs very fine in tests, exception can be thrown and if it is, it successfully fails on uncaught exception.
In runs fine in real world when no exception is thrown.
But when condition passes in real world and exception is thrown, --- THROWING --- gets printed, which should be followed by uncaught exception, but instead it spins off crazy and fails after a while, producing time limit exceeded error. I know for sure that the exception is thrown and I know for sure that I'm not catching the exception anywhere.