~xibo-maintainers/xibo/tempel

« back to all changes in this revision

Viewing changes to lib/Exception/NotFoundException.php

  • Committer: Dan Garner
  • Date: 2016-06-28 15:02:11 UTC
  • mto: This revision was merged to the branch mainline in revision 528.
  • Revision ID: git-v1:51031805c36c1d366fa330b2c2320d1927c57003
Fixes for upgrade steps

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
namespace Xibo\Exception;
24
24
 
25
 
/**
26
 
 * Class NotFoundException
27
 
 * @package Xibo\Exception
28
 
 */
29
 
class NotFoundException extends XiboException
 
25
 
 
26
class NotFoundException extends \Exception
30
27
{
31
 
    public $httpStatusCode = 404;
32
 
    public $handledException = true;
33
 
    public $entity = null;
34
 
 
35
 
    /**
36
 
     * NotFoundException constructor.
37
 
     * @param string $message
38
 
     * @param string $entity
39
 
     */
40
 
    public function __construct($message = null, $entity = null)
41
 
    {
42
 
        $this->entity = $entity;
43
 
 
44
 
        if ($message === null)
 
28
    public function __construct($message = "", $code = 0, \Exception $previous = null) {
 
29
        if ($message === "")
45
30
            $message = __('Not Found');
46
31
 
47
 
        parent::__construct($message);
48
 
    }
49
 
 
50
 
    /**
51
 
     * @return array
52
 
     */
53
 
    public function getErrorData()
54
 
    {
55
 
        return ['entity' => $this->entity];
 
32
        parent::__construct($message, $code, $previous);
56
33
    }
57
34
}
 
 
b'\\ No newline at end of file'