mirror of
https://github.com/Combodo/iTop.git
synced 2026-06-12 10:52:20 +02:00
28 lines
542 B
PHP
28 lines
542 B
PHP
<?php
|
|
|
|
namespace Combodo\iTop\Exception;
|
|
|
|
use Exception;
|
|
use IssueLog;
|
|
use LogChannels;
|
|
use Throwable;
|
|
|
|
class ItopException extends Exception
|
|
{
|
|
private array $aContext;
|
|
|
|
public function __construct(string $message = '', int $code = 0, ?Throwable $previous = null, array $aContext = [])
|
|
{
|
|
$aContext['code'] = $code;
|
|
IssueLog::Debug($message, LogChannels::EXCEPTION, $aContext);
|
|
parent::__construct($message, $code, $previous);
|
|
$this->aContext = $aContext;
|
|
}
|
|
|
|
public function getContext(): array
|
|
{
|
|
return $this->aContext;
|
|
}
|
|
|
|
|
|
} |