Convert errors into HttpException calls

This commit is contained in:
Nabeel Shahzad
2018-02-22 15:15:00 -06:00
parent 3748ab77d2
commit 53b0bbd936
6 changed files with 73 additions and 21 deletions

View File

@@ -0,0 +1,20 @@
<?php
/**
*
*/
namespace App\Exceptions;
use Symfony\Component\HttpKernel\Exception\HttpException;
class PirepCancelled extends HttpException
{
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = [])
{
parent::__construct(
400,
'PIREP has been cancelled, updates are not allowed',
$previous, $headers, $code
);
}
}