forked from EasyCorp/EasyAdminBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEntityNotFoundException.php
More file actions
26 lines (22 loc) · 870 Bytes
/
EntityNotFoundException.php
File metadata and controls
26 lines (22 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
/*
* This file is part of the EasyAdminBundle.
*
* (c) Javier Eguiluz <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace JavierEguiluz\Bundle\EasyAdminBundle\Exception;
/**
* @author Javier Eguiluz <[email protected]>
*/
class EntityNotFoundException extends BaseException
{
public function __construct(array $parameters = array())
{
$errorMessage = sprintf('The "%s" entity with "%s = %s" does not exist in the database.', $parameters['entity']['name'], $parameters['entity']['primary_key_field_name'], $parameters['entity_id']);
$proposedSolution = sprintf('Check that the mentioned entity hasn\'t been deleted by mistake.');
parent::__construct($errorMessage, $proposedSolution, 404);
}
}