/** * @param Exception\JobInvalidStateException $e * @return StorageApiEvent */ public function stateError(Exception\JobInvalidStateException $e) { $event = $this->prepareEvent(); $event->setMessage($e->getMessage())->setParams(array('status' => $this->job->getStatus(), 'pid' => getmypid())); $this->save($event); return $event; }