This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
redir/application/classes/Database/Exception.php
2013-04-15 17:38:25 +10:00

23 lines
672 B
PHP

<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class overrides Kohana's Database Exception
*
* @package Redir/Modifications
* @category Classes
* @author Deon George
* @copyright (c) 2010-2013 Deon George
* @license http://dev.leenooks.net/license.html
*/
class Database_Exception extends Kohana_Database_Exception {
public function __construct($message='',array $variables=NULL,$code=0,Exception $previous=NULL) {
// Prepare the response object.
$response = Response::factory();
$response->status(500);
$response->body('Oops, something went wrong :(');
echo $response->send_headers()->body();
exit(1);
}
}
?>