diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-09-16 00:51:12 -0700 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-09-16 00:51:12 -0700 |
commit | c20f01bbf0a1fe00efcdbd01898cdbdf76aafcb0 (patch) | |
tree | b3ab7af1ce85c80dc2b9e2228700bb401b7a0ae9 | |
parent | da0631e1854529493b405c3c6036c91bd941a6ba (diff) | |
parent | eab84d3d9601802a852139a643c501018d3e6379 (diff) | |
download | nextcloud-server-c20f01bbf0a1fe00efcdbd01898cdbdf76aafcb0.tar.gz nextcloud-server-c20f01bbf0a1fe00efcdbd01898cdbdf76aafcb0.zip |
Merge pull request #4862 from owncloud/db_to_public
Add OCP\DB::getErrorMessage() to public namespace.
-rw-r--r-- | lib/public/db.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/public/db.php b/lib/public/db.php index 932e79d9ef1..9512cca2d19 100644 --- a/lib/public/db.php +++ b/lib/public/db.php @@ -102,4 +102,15 @@ class DB { public static function isError($result) { return(\OC_DB::isError($result)); } + + /** + * returns the error code and message as a string for logging + * works with DoctrineException + * @param mixed $error + * @return string + */ + public static function getErrorMessage($error) { + return(\OC_DB::getErrorMessage($error)); + } + } |