mapper = $mapper; } private function handleException ($e) { if ($e instanceof DoesNotExistException || $e instanceof MultipleObjectsReturnedException) { throw new NotFoundException($e->getMessage()); } else { throw $e; } } //Find an Agency public function find(int $id) { try { return $this->mapper->find($id); } catch(Exception $e) { $this->handleException($e); } } //Find an Agency public function getAgencyIdByUserUid(string $useruid) { return $this->mapper->getAgencyIdByUserUid($useruid); //try { // return $this->mapper->getAgencyIdByUserUid($useruid); //} catch(Exception $e) { // $this->handleException($e); //} } }