Never throw an exception at the user, always catch it can synthesize it to a correct html response with appropriate headers. You can use the constants and accessor to get HTML values to return.
Наследование: extends Exceptions\Http\HttpException, implements ClientErrorExceptionInterface
 /**
  * NotFoundException constructor.
  *
  * @param string $message  Error message (HTTP) that defines this exception
  * @param int    $code     Error code (HTTP) that defines this exception
  * @param null   $previous Inner/Previous exception that triggered this exception
  */
 public function __construct($message = self::HTTP_MESSAGE, $code = self::HTTP_CODE, $previous = null)
 {
     parent::__construct($message, $code, $previous);
 }