ModCfg/Application/Model/Exception/d3_cfg_mod_exception.php

61 lines
1.4 KiB
PHP
Raw Normal View History

2024-04-19 16:15:46 +02:00
<?php
/**
2024-09-02 08:48:43 +02:00
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
2024-04-19 16:15:46 +02:00
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
2024-09-02 08:48:43 +02:00
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
2024-04-19 16:15:46 +02:00
*/
namespace D3\ModCfg\Application\Model\Exception;
2024-06-26 13:49:30 +02:00
use DateTimeImmutable;
2024-04-19 16:15:46 +02:00
/**
* handle d3_cfg_mod specific exceptions
*/
class d3_cfg_mod_exception extends d3modprofile_exception
{
protected $_sCompareData;
/**
* @return string
*/
public function getString()
{
2024-06-26 13:49:30 +02:00
$sStr = self::class . " (time: " . (new DateTimeImmutable())->format('Y-m-d H:i:s')
. "): [{$this->code}]: {$this->message} ";
2024-04-19 16:15:46 +02:00
if ($this->getCompareData()) {
$sStr .= "(".$this->getCompareData().") ";
}
$sStr .= "- Faulty ModCfg: " . $this->getModCfgId();
//." \n Stack Trace: {$this->getTraceAsString()}\n\n";
return $sStr;
}
/**
* @param $sCompareData
*/
public function setCompareData($sCompareData)
{
$this->_sCompareData = $sCompareData;
}
/**
* @return mixed
*/
public function getCompareData()
{
return $this->_sCompareData;
}
}