For better compatibility, use Exception as the type hint in Net_Gearman_Worker->fail method.