Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8239763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:15:20+00:00 2026-06-07T20:15:20+00:00

I’ve been trying to find a full explanation on how to custom error pages

  • 0

I’ve been trying to find a full explanation on how to custom error pages in Kohana 3.0 and I haven’t been lucky so far. So, based on the solution provided by Kohana Guide can anyone show me how to do it?

When I say full explanation I mean, the location of the classes, their names, which ones to extend, full code, and please, a view for one of the errors.

Many thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T20:15:22+00:00Added an answer on June 7, 2026 at 8:15 pm

    I suggest you read http://kohanaframework.org/3.0/guide/kohana/conventions. You can work out the files that need to be created for yourself based on the class names and how Kohana autoloads. The beauty of Kohana for me is that it doesn’t try and do everything for you and for that reason its is really important to read the documentation in my opinion.

    Note: I haven’t used Kohana 3.0 in particular but this should apply.

    For example, in part 1, is this code:

    <?php defined('SYSPATH') or die('No direct access');
    
    class HTTP_Response_Exception extends Kohana_Exception {}
    

    Kohana uses a ‘cascading filesystem‘ so you would add the code shown in 2 to

    application/classes/kohana/exception.php

    Inside that file you would extend the Kohana exception handler

    class Kohana_Exception extends Kohana_Kohana_Exception {
    
       public static function exception_handler(Exception $e)
       {
           ...
       }
    }
    

    The route shown gets added to your applications bootstrap which is under

    application/bootstrap.php

    As errors are being routed you can tell what the controller will be:

    Route::set('error', 'error/<action>(/<message>)', array('action' => '[0-9]++', 'message' => '.+'))
    ->defaults(array(
        'controller' => 'error_handler'
    ));
    

    So there will be a controller created at:

    application/classes/controller/error_handler.php

    This will look like:

    <?php defined('SYSPATH') or die('No direct script access.');
    
    class Controller_Error_Handler extends Controller_Template {
    
        ...
    
        public function action_404()
        {
            $this->template->title = '404 Not Found';
            // A view example
            $view = View::factory('error/404');
            $view->render();
            ...
        }
    }
    

    Your views would then (possibly) be placed under:

    application/views/error/404.php

    The reason the documentation is brief is because the same answers do not apply to everyone. For example the majority of people (I know) use their own templates etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.