This commit is contained in:
19
api/app/Exceptions/Bpa/ExportacaoEmAndamentoException.php
Normal file
19
api/app/Exceptions/Bpa/ExportacaoEmAndamentoException.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions\Bpa;
|
||||
|
||||
use Exception;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class ExportacaoEmAndamentoException extends Exception
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->message = 'Já existe uma exportação em andamento. Por favor, aguarde a conclusão antes de iniciar uma nova exportação.';
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return response()->json(['message' => $this->message], Response::HTTP_BAD_REQUEST);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user