this documentation dayanarak, hangi bir hata sayfasına yönlendiren bir catch all rotayı uyguladık.
İşte benim bootstrap.php son rota
Route::set('default', '<path>', array('path' => '.+'))
    ->defaults(array(
        'controller' => 'errors',
        'action'     => '404',
    ));
Ben bu istisna ben çalıştığınızda, atılır ve var olmayan bir sayfaya gitmek almaya devam Ancak
Kohana_Exception [ 0 ]: Required route parameter not passed: path
Ben (yani parantez içine sarın) <path> segment isteğe yaparsanız o zaman sadece bir home rotayı yüklemek gibi görünüyor ...
Route::set('home', '')
    ->defaults(array(
        'controller' => 'home',
        'action'     => 'index',
    ));
Ev rota ilk tanımlanır.
Ben bu yüzden gibi benim ana isteği yürütmek
$request = Request::instance();
try {
    // Attempt to execute the response
    $request->execute();
} catch (Exception $e) {
   if (Kohana::$environment === Kohana::DEVELOPMENT) throw $e;
    // Log the error
    Kohana::$log->add(Kohana::ERROR, Kohana::exception_text($e));
    // Create a 404 response
    $request->status = 404;
    $request->response = Request::factory(Route::get('default')->uri())->execute();
}
$request->send_headers();
echo $request->response;
Bu 404 başlık tarayıcınıza gönderilen, ama o benim hataları denetleyicisi kurmak 404 hatası göstermelidir yakalama tüm rotayı isteği göndererek tarafından kabul anlamına gelir.
<?php defined('SYSPATH') or die('No direct script access.');
class Controller_Errors extends Controller_Base {
    public function before() {
        parent::before();
    }
    public function action_404() {
        $this->bodyClass[] = '404';
        $this->internalView = View::factory('internal/not_found');
        $longTitle = 'Page Not Found';
        $this->titlePrefix = $longTitle;
    }
}
Neden benim 404 hata sayfası göstermek değil mi?