Added \ncc\Exceptions > UnsupportedProjectTypeException
https://git.n64.cc/nosial/ncc/-/issues/28
This commit is contained in:
parent
6a37c8216d
commit
847128cdc1
2 changed files with 28 additions and 3 deletions
|
@ -2,8 +2,6 @@
|
|||
|
||||
namespace ncc\Abstracts;
|
||||
|
||||
use ncc\Exceptions\GitlabServiceException;
|
||||
|
||||
/**
|
||||
* @author Zi Xing Narrakas
|
||||
* @copyright Copyright (C) 2022-2022. Nosial - All Rights Reserved.
|
||||
|
@ -320,6 +318,11 @@
|
|||
*/
|
||||
const NotSupportedException = -1761;
|
||||
|
||||
/**
|
||||
* @see UnsupportedProjectTypeException
|
||||
*/
|
||||
const UnsupportedProjectTypeException = -1762;
|
||||
|
||||
/**
|
||||
* All the exception codes from NCC
|
||||
*/
|
||||
|
@ -382,6 +385,7 @@
|
|||
self::GitlabServiceException,
|
||||
self::GitTagsException,
|
||||
self::AuthenticationException,
|
||||
self::NotSupportedException
|
||||
self::NotSupportedException,
|
||||
self::UnsupportedProjectTypeException
|
||||
];
|
||||
}
|
21
src/ncc/Exceptions/UnsupportedProjectTypeException.php
Normal file
21
src/ncc/Exceptions/UnsupportedProjectTypeException.php
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace ncc\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use ncc\Abstracts\ExceptionCodes;
|
||||
use Throwable;
|
||||
|
||||
class UnsupportedProjectTypeException extends Exception
|
||||
{
|
||||
|
||||
/**
|
||||
* @param string $message
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct(string $message = "", ?Throwable $previous = null)
|
||||
{
|
||||
parent::__construct($message, ExceptionCodes::UnsupportedProjectTypeException, $previous);
|
||||
$this->message = $message;
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue