<?php
namespace JExtstore\Component\JRealtimeAnalytics\Administrator\Framework;
/**
 * @package JREALTIMEANALYTICS::FRAMEWORK::administrator::components::com_jrealtimeanalytics
 * @subpackage framework
 * @subpackage exception
 * @author Joomla! Extensions Store
 * @copyright (C) 2013 - Joomla! Extensions Store
 * @license GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html
 */
defined('_JEXEC') or die('Restricted access');

/**
 * JRealtime Exception object
 *
 * @package JREALTIMEANALYTICS::FRAMEWORK::administrator::components::com_jrealtimeanalytics
 * @subpackage framework
 * @subpackage exception
 * @since 2.0
 */
class Exception extends \Exception {
	/**
	 * Error level
	 * @access private
	 * @var string
	 */
	private $exceptionLevel;
	
	/**
	 * Error level accessor method
	 * @access public
	 * @return string
	 */
	public function getExceptionLevel() {
		return $this->exceptionLevel;
	}
	
	/**
	 * Class constructor
	 * @access public
	 * @return Object&
	 */
	public function __construct($message, $level = 'error', $file = '', $code = 0) {
		parent::__construct($message, $code);
	
		// Set error level
		$this->exceptionLevel = $level;
		
		// Set file info for SMVC core 
		$this->file = $file;
	}
}