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

23 lines
672 B
PHP
Raw Permalink Normal View History

2013-04-15 07:38:07 +00:00
<?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);
}
}
?>