Added UnsupportedRemoteSourceTypeException.php

https://git.n64.cc/nosial/ncc/-/issues/28
This commit is contained in:
Netkas 2022-12-10 04:29:03 -05:00
parent d664cf7bf0
commit 1f4ef9aba1
2 changed files with 26 additions and 0 deletions

View file

@ -273,6 +273,11 @@
*/ */
const HttpException = -1752; const HttpException = -1752;
/**
* @see UnsupportedRemoteSourceTypeException
*/
const UnsupportedRemoteSourceTypeException = -1753;
/** /**
* All the exception codes from NCC * All the exception codes from NCC
*/ */
@ -329,5 +334,6 @@
self::UserAbortedOperationException, self::UserAbortedOperationException,
self::MissingDependencyException, self::MissingDependencyException,
self::HttpException, self::HttpException,
self::UnsupportedRemoteSourceTypeException
]; ];
} }

View file

@ -0,0 +1,20 @@
<?php
namespace ncc\Exceptions;
use Exception;
use ncc\Abstracts\ExceptionCodes;
use Throwable;
class UnsupportedRemoteSourceTypeException extends Exception
{
/**
* @param string $message
* @param Throwable|null $previous
*/
public function __construct(string $message = "", ?Throwable $previous = null)
{
parent::__construct($message, ExceptionCodes::UnsupportedRemoteSourceTypeException, $previous);
$this->message = $message;
}
}