Added RuntimeException to \ncc\Exceptions

This commit is contained in:
Netkas 2022-05-06 17:32:21 +01:00
parent 4d4231d1ec
commit d46b2b1422
2 changed files with 23 additions and 0 deletions

View file

@ -44,4 +44,7 @@
* @see MalformedJsonException * @see MalformedJsonException
*/ */
const MalformedJsonException = -1705; const MalformedJsonException = -1705;
const RuntimeException = -1706;
} }

View file

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