From: Thomas Tanghus Date: Mon, 16 Sep 2013 00:17:39 +0000 (+0200) Subject: Add OCP\DB::getErrorMessage() to public namespace. X-Git-Tag: v6.0.0alpha2~173^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=eab84d3d9601802a852139a643c501018d3e6379;p=nextcloud-server.git Add OCP\DB::getErrorMessage() to public namespace. --- 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)); + } + }