Comment 2 for bug 1126496

Revision history for this message
Eric Lambert (elambert) wrote :

Khai:

I've committed a fix for this. Now if your function throws an exception, the stack trace for that exception should be available by calling getExceptions on the job result --as I write this it occurred to me that perhaps the stack trace is not always what you might want here, let me know if that is an issue.

In case you are interested, the main problem was that by default the Gearman Job Server does not forward WORK_EXCEPTION packets back to the client. This needs to be enabled by the client on a per-connection basis which the client was not doing. As part of this fix, the client now by default will enable this behavior.

Also, if the GearmanJobResult given back to the worker from the function has any warnings, those too should be sent back to the client.

If you have questions about how these work you can either let me know or see the GearmanClientJobExecTest test-suite, specifically looking at the exceptionThrownDuringFunctionTest, excectionThrownNotPassedToClient, and warningTest test cases.

Eric

PS

I refrained from pushing this fix to my maven SNAPSHOT repo as based on our last email exchange it seemed like you might be pulling from SNAPSHOT latest and I wanted to give you a chance to look at this before it appeared in your environment.

Also, assuming no major issues with this patch, i suspect I will be releasing 0.06 soon