system/log/exceptions/TranslatableError.php
2013-04-21 18:12:13 +02:00

18 lines
575 B
PHP

<?php
namespace SYSTEM\LOG;
class TranslatableError extends \SYSTEM\LOG\ERROR {
public function __construct($string_id, $code = 0, $previous = NULL , $locale = NULL){
$message = \SYSTEM\locale::getStrings(array($string_id), $locale);
//print_r($message);
if(!isset($message[$string_id])){
throw new \SYSTEM\LOG\ERROR("Could not retrive Errortranslation: ".$string_id);}
parent::__construct($message[$string_id], $code, $previous);
\SYSTEM\LOG\LOG::__exception_handler($this,false);
}
}