Added RuntimeException to \ncc\Exceptions
This commit is contained in:
parent
4d4231d1ec
commit
d46b2b1422
2 changed files with 23 additions and 0 deletions
|
@ -44,4 +44,7 @@
|
|||
* @see MalformedJsonException
|
||||
*/
|
||||
const MalformedJsonException = -1705;
|
||||
|
||||
|
||||
const RuntimeException = -1706;
|
||||
}
|
20
src/ncc/Exceptions/RuntimeException.php
Normal file
20
src/ncc/Exceptions/RuntimeException.php
Normal 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);
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue