refactor file uploading and add media picker errors
This commit is contained in:
37
app/Exceptions/FileInvalidException.php
Normal file
37
app/Exceptions/FileInvalidException.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class FileInvalidException extends Exception
|
||||
{
|
||||
/**
|
||||
* The error code of the exception.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $code;
|
||||
|
||||
/**
|
||||
* The error message of the exception.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $message;
|
||||
|
||||
/**
|
||||
* Create a new exception instance.
|
||||
*
|
||||
* @param string $message
|
||||
* @param int $code
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(string $message, int $code = 0)
|
||||
{
|
||||
$this->message = $message;
|
||||
$this->code = $code;
|
||||
|
||||
parent::__construct($message, $code);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user