Hi
$debug is used in 3.1.0/3.1.1/4.0.0 but only in perl code (with the exception of the php srktimer routine in 3.1.1, which you've seen and which was dropped in 4.0.0).
try/catch is used in the generator php code but only for SQL call errors.
The generator code was rewritten from perl to php in 3.0. I just did a diff on the 3.1.0 generator vs 4.0.0 generator and there are maybe 50 lines of code different, so its been pretty stable, particularly when that includes the change to dynamic queues/agents.
3.1.0 is too old to do general patching now, although we will occasionally make changes for active customers; we still have a lot on -145, it was a pretty good release.
Best
S