/** * DuplicateTranslationException Constructor * * @param string $language The language the translation is for * @param string $phraseid The phrase id for the translation * @param string $duplicate The duplicate translation */ public function __construct($language, $phraseid, $translation) { // Let the parent set us up parent::__construct(); // Access the translator $translator = Translator::getTranslator(); // Complete the error message $this->message = sprintf($this->message, $language, $phraseid, $translator->translate($phraseid, $language), $translation); }
public function __construct() { parent::__construct(); $this->message = "[FAILED_TO_ADD_PRICE_DUPLICATE]"; }
/** * Display Exception * * @param SWException $e Exception to be passed to the presentation layer */ function exception($e) { $_SESSION['exceptions'][] = $e->__toString(); }
/** * Invalid Date Input Format Exception Constructor * * @param string $format The invalid format */ public function __construct($format = "NULL") { parent::__construct(); $this->message = sprintf("Invalid date-input format: %s", $format); }