Answer the question
In order to leave comments, you need to log in
How does Gearman know that an Exception has been thrown even if it is wrapped in a catch?
The worker exits with error code 1( exit(1)) on errors, even if it is wrapped with a try catch. How does Gearman know about an error and complete the task?
$worker->addFunction('someFunction', $this,'someFunction');
function someFunction(GearmanJob $job){
try{
throw new Exception('ERROR');
}catch(Exception $exception){
}
}
when starting this worker and executing functions german terminates the process.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question