src/Traits/FindMethodTrait.php
protected function _notFound($id, Subject $subject)
    {
        $subject->set(['success' => false]);
        $this->_trigger('recordNotFound', $subject);

        $message = $this->message('recordNotFound', compact('id'));
        $exceptionClass = $message['class'];
        throw new $exceptionClass($message['text'], $message['code']);
    }
protected function _notFound($id, Subject $subject)
    {
        $subject->set(['success' => false]);
        $this->_trigger('recordNotFound', $subject);

        $message = $this->message('recordNotFound', compact('id'));
        $exceptionClass = $message['class'];
        throw new $exceptionClass($message['text'], $message['code']);
    }
protected function _notFound ( $ id , Subject $ subject ) { $ subject -> set ( [ 'success' => false ] ) ; $ this -> _trigger ( 'recordNotFound' , $ subject ) ; $ message = $ this -> message ( 'recordNotFound' , compact ( 'id' ) ) ; $ exceptionClass = $ message [ 'class' ] ; throw new $ exceptionClass ( $ message [ 'text' ] , $ message [ 'code' ] ) ; }
Throw exception if a record is not found

@param string $id Record id
@param \Crud\Event\Subject $subject Event subject
@return void
@throws \Exception
Throw exception if a record is not found