<?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);
	}
}
?>