Cakephp NotFoundException does not display anything

1)I wanna throw an error when id is not set or id is wrong.
2)I wanna throw an error when id is set but is not in the database.
Why don’t show me anything when i put wrong id? I expected to display the error message.

ItemController.php:

    <?php
    /**
     * Created by PhpStorm.
     * User: Marian39
     * Date: 11/17/2016
     * Time: 8:07 PM
     */
    
    namespace App\Controller;
    
    use Cake\Network\Exception\NotFoundException;
    
    class ItemsController extends AppController
    {
        public function view($id = null)
        {
            if(!$id)
            {
                throw new NotFoundException(__("id is not set or wrong"));
            }
    
            $data= $this->Items->findById($id);

            if(!$data)
            {
                throw new NotFoundException(__("id is not in the database"));
            }

            $this->set('items', $data);
        }
    
        public function index()
        {
            $data = $this->Items->find('all', array('order'=>'year'));
            $count = $this->Items->find()->count();
            $info = array('items'=>$data,
                          'count' => $count);
            $this->set($info);
             // $this->set('items', $data);
            // $this->set('count', $count);
    
            //this->set('color', 'blue');
        }
    
    }
    ?>

view.ctp from template:

<?ph    p foreach($items as $item): ?>

        <div>
            <h2>
                <?php echo h($item['title']);?>
                <?php echo h($item['year']);?>
            </h2>
            <p>
                Length: <?php echo h($item['length']);?>
            </p>
            <div>
                <?php echo h($item['description']);?>
            </div>
        </div>
    
    <?php endforeach; ?>