This commit is contained in:
17
api/app/Exceptions/AtencaoBasica/AcompanhamentoException.php
Normal file
17
api/app/Exceptions/AtencaoBasica/AcompanhamentoException.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions\AtencaoBasica;
|
||||
|
||||
use Exception;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class AcompanhamentoException extends Exception
|
||||
{
|
||||
|
||||
public function render()
|
||||
{
|
||||
return response()->json([
|
||||
'message' => 'O acompanhamento <strong>' . json_decode($this->getMessage()) .'</strong> é incompatível com o sexo do(a) paciente.'
|
||||
], Response::HTTP_BAD_REQUEST);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user