<?php

namespace App\Controllers;

use CodeIgniter\Controller;
use CodeIgniter\HTTP\ResponseInterface;

class TestError extends Controller
{
    /**
     * Trigger a 404 error for testing
     *
     * @return ResponseInterface
     */
    public function notFound()
    {
        throw new \CodeIgniter\Exceptions\PageNotFoundException('This is a test 404 error page');
    }

    /**
     * Trigger a general error for testing
     *
     * @return ResponseInterface
     */
    public function general()
    {
        throw new \Exception('This is a test general error');
    }
}