refactor file uploading and add media picker errors

This commit is contained in:
2024-04-29 22:00:34 +10:00
parent d3bf78d5a8
commit c696a8bd2e
5 changed files with 166 additions and 112 deletions

View 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);
}
}