summaryrefslogtreecommitdiffstats
path: root/src/exceptions
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-02-15 10:19:58 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-02-15 10:19:58 +0000
commit9873a43cd9fa983041ae97ea56d7a50fc569102e (patch)
tree1b167d65e68241d7a2ac4d35ffdec587e5233f2d /src/exceptions
parent43c70ac8906a9096bde1dd1905695e3c1cc7b522 (diff)
downloadzetacomponents-graph-9873a43cd9fa983041ae97ea56d7a50fc569102e.zip
zetacomponents-graph-9873a43cd9fa983041ae97ea56d7a50fc569102e.tar.gz
- Implemented #9405 (PDO data set)
Diffstat (limited to 'src/exceptions')
-rw-r--r--src/exceptions/missing_column.php24
-rw-r--r--src/exceptions/statement_not_executed.php24
-rw-r--r--src/exceptions/too_many_columns.php26
3 files changed, 74 insertions, 0 deletions
diff --git a/src/exceptions/missing_column.php b/src/exceptions/missing_column.php
new file mode 100644
index 0000000..11c8bdc
--- /dev/null
+++ b/src/exceptions/missing_column.php
@@ -0,0 +1,24 @@
+<?php
+/**
+ * File containing the ezcGraphPdoDataSetMissingColumnException class
+ *
+ * @package Graph
+ * @version //autogen//
+ * @copyright Copyright (C) 2005-2007 eZ systems as. All rights reserved.
+ * @license http://ez.no/licenses/new_bsd New BSD License
+ */
+/**
+ * Exception thrown if a requetsted column could not be found in result set
+ *
+ * @package Graph
+ * @version //autogen//
+ */
+class ezcGraphPdoDataSetMissingColumnException extends ezcGraphException
+{
+ public function __construct( $column )
+ {
+ parent::__construct( "Missing column '{$column}' in result set." );
+ }
+}
+
+?>
diff --git a/src/exceptions/statement_not_executed.php b/src/exceptions/statement_not_executed.php
new file mode 100644
index 0000000..2cbba5f
--- /dev/null
+++ b/src/exceptions/statement_not_executed.php
@@ -0,0 +1,24 @@
+<?php
+/**
+ * File containing the ezcGraphPdoDataSetStatementNotExecutedException class
+ *
+ * @package Graph
+ * @version //autogen//
+ * @copyright Copyright (C) 2005-2007 eZ systems as. All rights reserved.
+ * @license http://ez.no/licenses/new_bsd New BSD License
+ */
+/**
+ * Exception thrown if a given statement has not been executed.
+ *
+ * @package Graph
+ * @version //autogen//
+ */
+class ezcGraphPdoDataSetStatementNotExecutedException extends ezcGraphException
+{
+ public function __construct( $statement )
+ {
+ parent::__construct( "Empty result set. Execute the statement before using with ezcGraphPdoDataSet." );
+ }
+}
+
+?>
diff --git a/src/exceptions/too_many_columns.php b/src/exceptions/too_many_columns.php
new file mode 100644
index 0000000..3aa5b8d
--- /dev/null
+++ b/src/exceptions/too_many_columns.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * File containing the ezcGraphPdoDataSetTooManyColumnsException class
+ *
+ * @package Graph
+ * @version //autogen//
+ * @copyright Copyright (C) 2005-2007 eZ systems as. All rights reserved.
+ * @license http://ez.no/licenses/new_bsd New BSD License
+ */
+/**
+ * Exception thrown if a data set has too many columns for a key value
+ * association.
+ *
+ * @package Graph
+ * @version //autogen//
+ */
+class ezcGraphPdoDataSetTooManyColumnsException extends ezcGraphException
+{
+ public function __construct( $row )
+ {
+ $columnCount = count( $row );
+ parent::__construct( "'{$columnCount}' columns are too many in a result." );
+ }
+}
+
+?>
OpenPOWER on IntegriCloud