summaryrefslogtreecommitdiffstats
path: root/lib/private/databaseexception.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-11-26 12:38:24 +0100
committerJoas Schilling <nickvergessen@gmx.de>2014-11-27 11:10:04 +0100
commite1f3abf7a583669ba1fed703365de9e12a76e22c (patch)
tree75cffc34cf486d4b1759160dfb5cd93c4b6f3dd0 /lib/private/databaseexception.php
parent3338eede3ccb2ead223a46fd537b7504bb4786e0 (diff)
downloadnextcloud-server-e1f3abf7a583669ba1fed703365de9e12a76e22c.tar.gz
nextcloud-server-e1f3abf7a583669ba1fed703365de9e12a76e22c.zip
Correctly namespace and autoload DatabaseException
Diffstat (limited to 'lib/private/databaseexception.php')
-rw-r--r--lib/private/databaseexception.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/private/databaseexception.php b/lib/private/databaseexception.php
new file mode 100644
index 00000000000..1135621ead2
--- /dev/null
+++ b/lib/private/databaseexception.php
@@ -0,0 +1,23 @@
+<?php
+/**
+ * Copyright (c) 2012 Frank Karlitschek <frank@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC;
+
+class DatabaseException extends \Exception {
+ private $query;
+
+ //FIXME getQuery seems to be unused, maybe use parent constructor with $message, $code and $previous
+ public function __construct($message, $query = null){
+ parent::__construct($message);
+ $this->query = $query;
+ }
+
+ public function getQuery() {
+ return $this->query;
+ }
+}