https://github.com/jnbdz/kohana-error
Kohana module for handling errors and exceptions.
https://github.com/jnbdz/kohana-error
Last synced: 5 months ago
JSON representation
Kohana module for handling errors and exceptions.
- Host: GitHub
- URL: https://github.com/jnbdz/kohana-error
- Owner: jnbdz
- Created: 2012-02-04T03:49:48.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2012-02-04T04:11:02.000Z (over 13 years ago)
- Last Synced: 2023-03-11T20:49:26.072Z (over 2 years ago)
- Language: PHP
- Homepage:
- Size: 88.9 KB
- Stars: 5
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Kohana-error
===========Kohana module for handling errors and exceptions.
How to use
----------First, add this line:
'error' => MODPATH.'error',
inside:
Kohana::modules();
So that the module is loaded.
Second, in the bootstrap.php file you need to make sure that the "Kohana::$environment" is equal to "Kohana::PRODUCTION".
You could add it to the "init.php" file found in the module "Kohana-error" folder.
You can also add this line:
error_reporting(E_ALL ^ E_NOTICE ^ E_STRICT);
Now that you have the module install you can modify the controller and/or the views. It is recomended not to touch anything else.
You can also very easily call an error this way:
throw new HTTP_Exception_503('The website is down');
-------
Copyright (C) 2012
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.