コード例 #1
0
        return array_merge($arrayToReturn, $this->customMessage);
    }
    protected function getErrorMessage()
    {
        // obtener el texto final (ya localizado) de smarty.
        global $smarty;
        $localizedText = $smarty->getConfigVars($this->message);
        if (empty($localizedText)) {
            self::$log->error("Untranslated error message: {$this->message}");
            return "{untranslated:{$this->message}}";
        } else {
            return $localizedText;
        }
    }
}
ApiException::$log = Logger::getLogger('ApiException');
/**
 * InvalidArgumentException
 *
 */
class InvalidParameterException extends ApiException
{
    private $parameter;
    private $additional_parameters;
    /**
     *
     * @param string $message
     * @param Exception $previous
     */
    public function __construct($message, $parameter = null, $additional_parameters = array())
    {
コード例 #2
0
ファイル: ApiException.php プロジェクト: kukogit/omegaup
        return array_merge($arrayToReturn, $this->customMessage);
    }
    protected function getErrorMessage()
    {
        // obtener el texto final (ya localizado) de smarty.
        global $smarty;
        $localizedText = $smarty->getConfigVars($this->message);
        if (empty($localizedText)) {
            self::$log->error("Untranslated error message: {$this->message}");
            return "{untranslated:{$this->message}}";
        } else {
            return $localizedText;
        }
    }
}
ApiException::$log = Logger::getLogger("ApiException");
/**
 * InvalidArgumentException
 * 
 */
class InvalidParameterException extends ApiException
{
    private $parameter;
    private $additional_parameters;
    /**
     * 
     * @param string $message
     * @param Exception $previous
     */
    function __construct($message, $parameter = NULL, $additional_parameters = array())
    {