summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/class/table.class.php16
1 files changed, 7 insertions, 9 deletions
diff --git a/app/class/table.class.php b/app/class/table.class.php
index 0edff9d..be7a375 100644
--- a/app/class/table.class.php
+++ b/app/class/table.class.php
@@ -13,7 +13,6 @@
*/
require_once "class/database.class.php";
-require_once "class/databasekeyexception.class.php";
/*
* This class provides functionality for retrieving data from and updating
@@ -34,10 +33,9 @@ abstract class table
/*
* Instanciate an object representing an existing database entity
- * named by the given GUID. If no such GUID exists, a
- * databasekeyexception is thrown. If NULL is passed, no database
- * lookups are attempted. This is helpful for assembling new database
- * objects.
+ * named by the given GUID. If no such GUID exists, an exception
+ * is thrown. If NULL is passed, no database lookups are attempted.
+ * This is helpful for assembling new database objects.
*/
public function __construct(?string $guid = NULL)
{
@@ -50,14 +48,14 @@ abstract class table
/*
* This function will iterate the $fields array and initialize this
* object's class properties based on the table=>fields mapping. If
- * no such GUID exists, a databasekeyexception is thrown.
+ * no such GUID exists, an exception is thrown.
*/
private function loadObj(string $guid) : void
{
$guid = $this->db->esc($guid);
if (!$this->isGUID($guid))
- throw new databasekeyexception("GUID " . $guid . " does not exist");
+ throw new Exception("GUID " . $guid . " does not exist");
foreach ($this->fields as $tbl => $flds)
{
@@ -145,12 +143,12 @@ abstract class table
/*
* This function will remove this object from the database by deleting
* rows with this object's GUID from tables in $fields. If this object
- * does not have a GUID, throw a databasekeyexception.
+ * does not have a GUID, throw an exception.
*/
public function delObj() : void
{
if (!isset($this->guid))
- throw new databasekeyexception("GUID (null) does not exist");
+ throw new Exception("GUID (null) does not exist");
$guid = $this->db->esc($this->guid);