<?php

/**
 *
 * @author Peter Csubak (chuby)
 * @copyright Peter Csubak (chuby)
 */
class LoggerException extends Exception{

	private function message($msg, $params){
		$mess = Translator::Translate($msg);
		if (is_array($params)){
			foreach ($params as $key => $value){
				$mess = str_replace("<<".$key.">>", $value, $mess);
			}
		}
		return $mess;
	}

	public function __construct($msg, $params = null, $code = 0){
		parent::__construct($this->message($msg, $params), $code);
	}
	
}
?>