Added BuildException.php
This commit is contained in:
parent
98b54a0e8d
commit
9e94c6ace3
2 changed files with 36 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
|||
use ncc\Exceptions\AccessDeniedException;
|
||||
use ncc\Exceptions\AutoloadGeneratorException;
|
||||
use ncc\Exceptions\BuildConfigurationNotFoundException;
|
||||
use ncc\Exceptions\BuildException;
|
||||
use ncc\Exceptions\ComponentVersionNotFoundException;
|
||||
use ncc\Exceptions\ConstantReadonlyException;
|
||||
use ncc\Exceptions\DirectoryNotFoundException;
|
||||
|
@ -168,6 +169,11 @@
|
|||
*/
|
||||
const UnsupportedExtensionVersionException = -1726;
|
||||
|
||||
/**
|
||||
* @see BuildException
|
||||
*/
|
||||
const BuildException = -1727;
|
||||
|
||||
/**
|
||||
* All the exception codes from NCC
|
||||
*/
|
||||
|
@ -198,6 +204,7 @@
|
|||
self::UnsupportedCompilerExtensionException,
|
||||
self::InvalidPropertyValueException,
|
||||
self::InvalidVersionConfigurationException,
|
||||
self::UnsupportedExtensionVersionException
|
||||
self::UnsupportedExtensionVersionException,
|
||||
self::BuildException
|
||||
];
|
||||
}
|
28
src/ncc/Exceptions/BuildException.php
Normal file
28
src/ncc/Exceptions/BuildException.php
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
/** @noinspection PhpPropertyOnlyWrittenInspection */
|
||||
|
||||
namespace ncc\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use ncc\Abstracts\ExceptionCodes;
|
||||
use Throwable;
|
||||
|
||||
class BuildException extends Exception
|
||||
{
|
||||
/**
|
||||
* @var Throwable|null
|
||||
*/
|
||||
private ?Throwable $previous;
|
||||
|
||||
/**
|
||||
* @param string $message
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct(string $message = "", ?Throwable $previous = null)
|
||||
{
|
||||
parent::__construct($message, ExceptionCodes::BuildException, $previous);
|
||||
$this->message = $message;
|
||||
$this->previous = $previous;
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue