[BUGFIX] Exception editing inline mm with deleted child child
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Classes / Form / Exception / DatabaseRecordException.php
1 <?php
2 namespace TYPO3\CMS\Backend\Form\Exception;
3
4 /*
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16
17 use TYPO3\CMS\Backend\Form\Exception;
18
19 /**
20 * A record could not be fetched from database, maybe it vanished meanwhile.
21 */
22 class DatabaseRecordException extends Exception
23 {
24 /**
25 * @var string Table name
26 */
27 protected $tableName;
28
29 /**
30 * @var int Table row uid
31 */
32 protected $uid;
33
34 /**
35 * Constructor overwrites default constructor.
36 *
37 * @param string $message Human readable error message
38 * @param int $code Exception code timestamp
39 * @param \Exception $previousException Possible exception from database layer
40 * @param string $tableName Table name query was working on
41 * @param int $uid Table row uid
42 */
43 public function __construct($message, $code, \Exception $previousException = null, $tableName, $uid)
44 {
45 parent::__construct($message, $code, $previousException);
46 $this->tableName = $tableName;
47 $this->uid = $uid;
48 }
49
50 /**
51 * Return table name
52 *
53 * @return string
54 */
55 public function getTableName()
56 {
57 return $this->tableName;
58 }
59
60 /**
61 * Return row uid
62 *
63 * @return int
64 */
65 public function getUid()
66 {
67 return $this->uid;
68 }
69 }